refactor(schema): move filesystem into system dictionary

This commit is contained in:
2026-02-11 05:37:18 +01:00
parent 3d026407e5
commit e7323258fd
8 changed files with 34 additions and 31 deletions

View File

@@ -23,7 +23,7 @@
changed_when: configuration_bootloader_result.rc == 0
- name: Ensure lvm2 for non btrfs filesystems
when: os | lower == "archlinux" and filesystem != "btrfs"
when: os | lower == "archlinux" and system_cfg.filesystem != "btrfs"
ansible.builtin.lineinfile:
path: /mnt/etc/mkinitcpio.conf
regexp: "^(HOOKS=.*block)(?!.*lvm2)(.*)"

View File

@@ -17,7 +17,7 @@
mode: "0644"
- name: Adjust XFS mount options and disable large extent
when: os in ["almalinux", "rocky", "rhel"] and filesystem == "xfs"
when: os in ["almalinux", "rocky", "rhel"] and system_cfg.filesystem == "xfs"
ansible.builtin.replace:
path: /mnt/etc/fstab
regexp: "(xfs.*?)(attr2)"

View File

@@ -20,7 +20,7 @@
{{
(
partitioning_main_uuid.stdout
if (filesystem | lower) == 'btrfs'
if (system_cfg.filesystem | lower) == 'btrfs'
else (partitioning_uuid_root | default([]) | first | default(''))
)
| default('')
@@ -36,11 +36,11 @@
else []
)
)
if (filesystem | lower) != 'btrfs'
if (system_cfg.filesystem | lower) != 'btrfs'
else []
}}
grub_root_flags: >-
{{ ['rootflags=subvol=@'] if (filesystem | lower) == 'btrfs' else [] }}
{{ ['rootflags=subvol=@'] if (system_cfg.filesystem | lower) == 'btrfs' else [] }}
grub_cmdline_linux_base: >-
{{
(['crashkernel=auto'] + grub_lvm_args)