--- - name: "Set root,boot partition paths" ansible.builtin.set_fact: # noqa: var-naming[no-role-prefix] as these facts are used for multiple roles and is easier read this way mnt_boot_path: "{{ partition_boot.mount_path }}" mnt_root_path: "{{ partition_root.mount_path }}" - name: "Install archlinux" when: ansible_facts['os_family'] == "Archlinux" block: - name: "Install archlinux" ansible.builtin.include_tasks: "install-archlinux.yml" - name: "Install archlinux on Mac" ansible.builtin.include_tasks: "install-archlinux-mac.yml" when: bootstrap_mac - name: "Install debian" when: ansible_facts['os_family'] == "Debian" block: - name: "Install ubuntu" ansible.builtin.include_tasks: "install-ubuntu.yml" when: ansible_facts['distribution'] == "Ubuntu" - name: "Install ubuntu on Mac" ansible.builtin.include_tasks: "install-ubuntu-mac.yml" when: ansible_facts['distribution'] == "Ubuntu" and bootstrap_mac - name: "Install raspberry" ansible.builtin.include_tasks: "install-raspberry.yml" when: ansible_facts['distribution'] == "Debian" and bootstrap_pi - name: "Install proxmox" ansible.builtin.include_tasks: "install-proxmox.yml" when: ansible_facts['distribution'] == "Debian" and bootstrap_proxmox - name: "Ensure ansible dependencies are installed in chroot" ansible.builtin.command: cmd: "arch-chroot {{ mnt_root_path }} apt-get install -y python3" changed_when: true - name: "Configure hostname in chroot" ansible.builtin.copy: dest: "{{ mnt_root_path }}/etc/hostname" mode: "0644" content: "{{ hostname }}"