diff options
| author | Ahmed Abdelhalim <[email protected]> | 2026-07-22 20:31:47 +0200 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2026-07-23 01:21:55 +0200 |
| commit | e7bf951b0115af3a953baff558b652c9ed46d344 (patch) | |
| tree | 0add7efdd71f12811e495f07e89571f9b17b63b1 /roles | |
| parent | f5fad766ec0f460a905c4a0b4ff31619f9b4b713 (diff) | |
Fix inventory creation for distro-configure new structure
Diffstat (limited to 'roles')
| -rw-r--r-- | roles/configure/tasks/main.yml | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/roles/configure/tasks/main.yml b/roles/configure/tasks/main.yml index dcfe208..90d1ff9 100644 --- a/roles/configure/tasks/main.yml +++ b/roles/configure/tasks/main.yml @@ -37,18 +37,18 @@ list_files: false remote_src: false - - name: "Update configure playbook inventory" + - name: "Add chroot connection override to configure inventory" ansible.builtin.copy: - dest: "/opt/ansible-distro-configure/inventory/hosts.yml" + dest: "/opt/ansible-distro-configure/inventory/chroot.yml" mode: "0640" content: | - {{ hostname }}: - vars: - ansible_user: "root" - ansible_connection: "chroot" - ansible_chroot_exe: "arch-chroot" + homelab: hosts: - {{ configure_chroot_path }}: + {{ hostname }}: + ansible_user: "root" + ansible_connection: "chroot" + ansible_chroot_exe: "arch-chroot" + ansible_host: "{{ configure_chroot_path }}" - name: "Download playbook dependencies on live environment" ansible.builtin.command: @@ -59,6 +59,8 @@ ansible.builtin.command: cmd: | ansible-playbook site.yml + -i inventory/hosts.yml + -i inventory/chroot.yml --limit "{{ hostname }}" --extra-vars '{"hostname":"{{ hostname }}"}' --extra-vars "@/opt/ansible-distro-configure/group_vars/homelab.yml" |
