summaryrefslogtreecommitdiffstats
path: root/roles/configure/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/configure/tasks')
-rw-r--r--roles/configure/tasks/install-debian.yml7
-rw-r--r--roles/configure/tasks/main.yml15
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: