refactor(schema): move filesystem into system dictionary
This commit is contained in:
@@ -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)(.*)"
|
||||
|
||||
@@ -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)"
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user