diff options
| author | Ahmed Abdelhalim <[email protected]> | 2025-08-11 00:33:32 +0200 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2025-08-11 00:33:32 +0200 |
| commit | e47ae78cfe17371ce240e134fd66f01ed120ffee (patch) | |
| tree | e43be879f5ef250ed0f68005daff481411aa97b5 /roles/configure/tasks | |
| parent | d96220d5b940f49dd5e22133c763b85bad91d5a0 (diff) | |
Remove configure dependency on other roles and add ubuntu support
Diffstat (limited to 'roles/configure/tasks')
| -rw-r--r-- | roles/configure/tasks/install-debian.yml | 7 | ||||
| -rw-r--r-- | roles/configure/tasks/main.yml | 15 |
2 files changed, 17 insertions, 5 deletions
diff --git a/roles/configure/tasks/install-debian.yml b/roles/configure/tasks/install-debian.yml new file mode 100644 index 0000000..d9dc732 --- /dev/null +++ b/roles/configure/tasks/install-debian.yml @@ -0,0 +1,7 @@ +--- +- name: "Ensure ansible dependencies are installed on live environment" + ansible.builtin.apt: + state: "present" + pkg: + - "python3" + - "python3-pip" diff --git a/roles/configure/tasks/main.yml b/roles/configure/tasks/main.yml index e4ff6b9..6a1e58c 100644 --- a/roles/configure/tasks/main.yml +++ b/roles/configure/tasks/main.yml @@ -1,8 +1,16 @@ --- +- name: "Set root partition paths" + ansible.builtin.set_fact: + configure_chroot_path: "{{ partition_root.mount_path }}" + - name: "Install archlinux" ansible.builtin.include_tasks: "install-archlinux.yml" when: ansible_os_family == "Archlinux" +- name: "Install debian" + ansible.builtin.include_tasks: "install-debian.yml" + when: ansible_os_family == "Debian" + - name: "Install ansible-core on live environment" # Can't install ansible-core using package manager # This resolve the "ERROR! ansible-galaxy requires resolvelib<1.1.1,>=0.5.3" @@ -13,10 +21,7 @@ break_system_packages: true - name: "Run distro-configure playbooks on bootstrapped distro" - when: - - configure_playbook_dir is defined - - mnt_root_path is defined - - hostname is defined + when: configure_playbook_dir is defined block: - name: "Archive playbook on controller" become: false @@ -55,7 +60,7 @@ ansible_connection: "chroot" ansible_chroot_exe: "arch-chroot" hosts: - {{ mnt_root_path }}: + {{ configure_chroot_path }}: - name: "Download playbook dependencies on live environment" ansible.builtin.command: |
