--- - name: Format the boot partition with vfat. filesystem: device: "{{ disk_egb_esp_device_node }}" state: present type: vfat - name: Format the root partition with btrfs. filesystem: device: "{{ disk_egb_root_device_node }}" state: present type: btrfs - 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 }}"