diff options
| author | Ahmed Abdelhalim <[email protected]> | 2025-08-11 00:33:30 +0200 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2025-08-11 00:33:30 +0200 |
| commit | d56f81f6d043cb6df7eb9fa01acae2678ff084ec (patch) | |
| tree | b87c4c65dbd34573f81c18536784267c7aa7c5dd /roles/bootstrap/tasks | |
| parent | 9612066c2431cc6a6e3e7ed558b464b0b1909ee2 (diff) | |
Add debugging output and minor refactoring
Diffstat (limited to 'roles/bootstrap/tasks')
| -rw-r--r-- | roles/bootstrap/tasks/install-archlinux.yml | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/roles/bootstrap/tasks/install-archlinux.yml b/roles/bootstrap/tasks/install-archlinux.yml index 057a639..1e4771a 100644 --- a/roles/bootstrap/tasks/install-archlinux.yml +++ b/roles/bootstrap/tasks/install-archlinux.yml @@ -2,8 +2,14 @@ - name: "Run pacstrap" ansible.builtin.command: cmd: "pacstrap -K {{ mnt_root_path }} base linux linux-firmware" + register: bootstrap_result changed_when: true +- name: "Display bootstrap output" + ansible.builtin.debug: + var: bootstrap_result.stdout_lines + verbosity: 1 + - name: "Generate fstab" ansible.builtin.shell: cmd: "genfstab -t PARTLABEL {{ mnt_root_path }} > {{ mnt_root_path }}/etc/fstab" @@ -44,12 +50,14 @@ force: false mode: "0644" -- name: "Ensure pacman is updated in chroot" - ansible.builtin.shell: | - arch-chroot {{ mnt_root_path }} pacman-key --init - arch-chroot {{ mnt_root_path }} pacman-key --populate - arch-chroot {{ mnt_root_path }} pacman -Syyu --noconfirm +- name: "Configure system in chroot" + ansible.builtin.command: + cmd: "arch-chroot {{ mnt_root_path }} {{ item }}" changed_when: true + with_items: + - "pacman-key --init" + - "pacman-key --populate" + - "pacman -Syyu --noconfirm" - name: "Ensure ansible dependencies are installed in chroot" ansible.builtin.command: |
