You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
870 B

---
- name: Format the boot partition with vfat.
filesystem:
device: "{{ disk_egb_esp_device_node }}"
state: present
type: vfat
force: true
- name: Format the root partition with btrfs.
filesystem:
device: "{{ disk_egb_root_device_node }}"
state: present
type: btrfs
force: true
- name: Mount the default subvolume.
mount:
state: mounted
src: "{{ disk_egb_root_device_node }}"
path: "{{ root_mount }}"
fstype: btrfs
opts: defaults,noatime,compress=zstd
- name: Create subvolumes.
command:
cmd: btrfs subvolume create {{ (root_mount + "/" + subvolume.name) }}
creates: '{{ (root_mount + "/" + subvolume.name) }}'
with_items: "{{ disk_egb_btrfs_subvolumes }}"
loop_control:
loop_var: subvolume
- name: Unmount the default subvolume.
mount:
state: unmounted
path: "{{ root_mount }}"