refactor: add loop_control labels to dict-based loops across all roles
This commit is contained in:
@@ -54,6 +54,8 @@
|
||||
- { subvol: pkg }
|
||||
- { subvol: var_log }
|
||||
- { subvol: var_log_audit }
|
||||
loop_control:
|
||||
label: "{{ item.subvol }}"
|
||||
register: partitioning_btrfs_subvol_result
|
||||
|
||||
- name: Set quotas for subvolumes
|
||||
@@ -61,6 +63,8 @@
|
||||
ansible.builtin.command: btrfs qgroup limit {{ item.quota }} /mnt/{{ '@' if item.subvol == 'root' else '@' + item.subvol }}
|
||||
loop:
|
||||
- { subvol: home, quota: "{{ partitioning_btrfs_home_quota }}" }
|
||||
loop_control:
|
||||
label: "{{ item.subvol }}"
|
||||
register: partitioning_btrfs_qgroup_result
|
||||
changed_when: false
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
- { lv: var }
|
||||
- { lv: var_log }
|
||||
- { lv: var_log_audit }
|
||||
loop_control:
|
||||
label: "{{ item.lv }}"
|
||||
|
||||
- name: Remove Unsupported features for older Systems
|
||||
when: >
|
||||
@@ -23,5 +25,7 @@
|
||||
- { lv: var }
|
||||
- { lv: var_log }
|
||||
- { lv: var_log_audit }
|
||||
loop_control:
|
||||
label: "{{ item.lv }}"
|
||||
register: partitioning_ext4_tune_result
|
||||
changed_when: partitioning_ext4_tune_result.rc == 0
|
||||
|
||||
@@ -122,6 +122,8 @@
|
||||
flags: "{{ item.flags | default(omit) }}"
|
||||
state: present
|
||||
loop: "{{ partitioning_layout }}"
|
||||
loop_control:
|
||||
label: "{{ item.name }}"
|
||||
rescue:
|
||||
- name: Refresh kernel partition table after failure
|
||||
ansible.builtin.command: "{{ item }}"
|
||||
@@ -144,6 +146,8 @@
|
||||
flags: "{{ item.flags | default(omit) }}"
|
||||
state: present
|
||||
loop: "{{ partitioning_layout }}"
|
||||
loop_control:
|
||||
label: "{{ item.name }}"
|
||||
|
||||
- name: Settle partition table
|
||||
ansible.builtin.command: "{{ item }}"
|
||||
@@ -415,6 +419,8 @@
|
||||
- { lv: var, size: "{{ partitioning_lvm_var_gb }}G" }
|
||||
- { lv: var_log, size: "{{ partitioning_lvm_var_log_gb }}G" }
|
||||
- { lv: var_log_audit, size: "{{ partitioning_lvm_var_log_audit_gb }}G" }
|
||||
loop_control:
|
||||
label: "{{ item.lv }}"
|
||||
|
||||
- name: Create filesystems
|
||||
block:
|
||||
@@ -658,6 +664,8 @@
|
||||
'ssd', 'space_cache=v2', 'discard=async', 'subvol=@var_log_audit'
|
||||
] | reject('equalto', '') | join(',')
|
||||
}}
|
||||
loop_control:
|
||||
label: "{{ item.path }}"
|
||||
|
||||
- name: Mount /boot filesystem
|
||||
when: partitioning_separate_boot | bool
|
||||
|
||||
@@ -12,3 +12,5 @@
|
||||
- { lv: var }
|
||||
- { lv: var_log }
|
||||
- { lv: var_log_audit }
|
||||
loop_control:
|
||||
label: "{{ item.lv }}"
|
||||
|
||||
Reference in New Issue
Block a user