feat(disks): add standardized multi-disk mount schema

This commit is contained in:
2026-02-11 05:37:18 +01:00
parent 961c8f259c
commit db08609acf
6 changed files with 71 additions and 71 deletions

View File

@@ -41,8 +41,8 @@
- name: Make root subvolumes
when:
- cis_enabled or item.subvol not in ['var_log_audit']
- swap_enabled | bool or item.subvol != 'swap'
- system_cfg.features.cis.enabled or item.subvol not in ['var_log_audit']
- system_cfg.features.swap.enabled | bool or item.subvol != 'swap'
ansible.builtin.command: btrfs su cr /mnt/{{ '@' if item.subvol == 'root' else '@' + item.subvol }}
args:
creates: /mnt/{{ '@' if item.subvol == 'root' else '@' + item.subvol }}
@@ -57,7 +57,7 @@
register: partitioning_btrfs_subvol_result
- name: Set quotas for subvolumes
when: cis_enabled
when: system_cfg.features.cis.enabled
ansible.builtin.command: btrfs qgroup limit {{ item.quota }} /mnt/{{ '@' if item.subvol == 'root' else '@' + item.subvol }}
loop:
- { subvol: home, quota: 2G }
@@ -65,7 +65,7 @@
changed_when: false
- name: Create a Btrfs swap file
when: swap_enabled | bool
when: system_cfg.features.swap.enabled | bool
ansible.builtin.command: >-
btrfs filesystem mkswapfile --size {{ partitioning_swap_size_gb }}g --uuid clear /mnt/@swap/swapfile
args: