blob: cc35056908e8653799b5e5368b42e1450bb70c13 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
---
- 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"
ansible.builtin.include_tasks: "install-archlinux.yml"
when: ansible_facts['os_family'] == "Archlinux"
- 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 raspberry"
ansible.builtin.include_tasks: "install-raspberry.yml"
when: ansible_facts['distribution'] == "Debian" and ansible_facts['architecture'] == "aarch64"
- 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 }}"
|