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.
34 lines
838 B
34 lines
838 B
3 years ago
|
---
|
||
|
- 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 }}"
|