2024-03-19 23:02:50 +01:00
---
- name : Create and format ext4 logical volumes
2024-10-31 05:46:33 +01:00
when : cis | bool or item.lv not in ['home', 'var', 'var_log', 'var_log_audit']
2024-07-11 22:20:45 +02:00
community.general.filesystem :
dev : /dev/sys/{{ item.lv }}
2024-03-19 23:02:50 +01:00
fstype : ext4
2024-07-11 22:09:58 +02:00
force : true
2024-03-19 23:02:50 +01:00
loop :
- { lv : root }
- { lv : home }
- { lv : var }
- { lv : var_log }
- { lv : var_log_audit }
- name : Remove Unsupported features for older Systems
2024-10-31 05:46:33 +01:00
when : (os | lower in ['almalinux', 'debian11', 'rhel8', 'rhel9', 'rocky']) and (cis | bool or item.lv not in ['home', 'var', 'var_log', 'var_log_audit'])
2024-07-11 22:20:45 +02:00
ansible.builtin.command : tune2fs -O "^orphan_file,^metadata_csum_seed" "/dev/sys/{{ item.lv }}"
2024-10-28 19:20:05 +01:00
changed_when : result.rc == 0
register : result
2024-03-19 23:02:50 +01:00
loop :
- { lv : root }
- { lv : home }
- { lv : var }
- { lv : var_log }
2024-07-11 22:09:58 +02:00
- { lv : var_log_audit }