fix(partitioning): add | bool to all system_cfg.features.cis.enabled checks

This commit is contained in:
2026-02-22 03:06:13 +01:00
parent b72816e985
commit 2f3fce42b5
6 changed files with 19 additions and 19 deletions

View File

@@ -1,6 +1,6 @@
---
- name: Create and format ext4 logical volumes
when: system_cfg.features.cis.enabled or item.lv not in ['home', 'var', 'var_log', 'var_log_audit']
when: system_cfg.features.cis.enabled | bool or item.lv not in ['home', 'var', 'var_log', 'var_log_audit']
community.general.filesystem:
dev: /dev/{{ partitioning_vg_name }}/{{ item.lv }}
fstype: ext4
@@ -17,7 +17,7 @@
- name: Remove Unsupported features for older Systems
when: >
(os in ['almalinux', 'rocky', 'rhel'] or (os == 'debian' and (os_version | string) == '11'))
and (system_cfg.features.cis.enabled or item.lv not in ['home', 'var', 'var_log', 'var_log_audit'])
and (system_cfg.features.cis.enabled | bool or item.lv not in ['home', 'var', 'var_log', 'var_log_audit'])
ansible.builtin.command: tune2fs -O "^orphan_file,^metadata_csum_seed" "/dev/{{ partitioning_vg_name }}/{{ item.lv }}"
loop:
- { lv: root }