---
- name: Create and format XFS logical volumes
  when: cis | bool or item.lv not in ['var_log', 'var_log_audit']
  community.general.filesystem:
    dev: /dev/sys/{{ item.lv }}
    fstype: xfs
    force: true
  loop:
    - { lv: root }
    - { lv: home }
    - { lv: var }
    - { lv: var_log }
    - { lv: var_log_audit }