ansible-workstation/roles/base/tasks/archinstall/prepare_chroot.yaml
2024-11-22 10:45:41 -06:00

28 lines
833 B
YAML

---
- name: Mount arch zroot
ansible.builtin.command: zfs mount zroot/ROOT/arch
- name: Mount all other zroot mountpoints
ansible.builtin.command: zfs mount -a
- name: Create zroot destination directories
ansible.builtin.file:
path: "/mnt{{ item }}"
state: directory
loop:
- /etc/zfs
- /boot/efi
- ansible.builtin.debug:
var: base_efi_partitions
- name: Mount EFI
ansible.posix.mount:
path: /mnt/boot/efi
src: "{{ base_efi_partitions | first }}"
fstype: vfat
state: mounted
- name: zfs | Set zroot bootfs to arch
ansible.builtin.command: zpool set bootfs=zroot/ROOT/arch zroot
- name: zfs | Set cachefile
ansible.builtin.command: zpool set cachefile=/etc/zfs/zpool.cache zroot
- name: zfs | Copy cache file to chroot
ansible.builtin.command: cp /etc/zfs/zpool.cache /mnt/etc/zfs