refactor: add loop_control labels to dict-based loops across all roles

This commit is contained in:
2026-02-20 23:00:53 +01:00
parent a63ffbc731
commit 041650c287
13 changed files with 41 additions and 0 deletions

View File

@@ -3,6 +3,8 @@
ansible.builtin.stat:
path: "{{ item.path }}"
loop: "{{ cis_permission_targets }}"
loop_control:
label: "{{ item.path }}"
register: cis_permission_stats
changed_when: false
@@ -13,4 +15,6 @@
group: "{{ item.item.group | default(omit) }}"
mode: "{{ item.item.mode }}"
loop: "{{ cis_permission_stats.results }}"
loop_control:
label: "{{ item.item.path }}"
when: item.stat.exists

View File

@@ -44,3 +44,5 @@
password [success=1 default=ignore] pam_unix.so obscure sha512 remember=5
- { path: /mnt/etc/hosts.deny, content: "ALL: ALL" }
- { path: /mnt/etc/hosts.allow, content: "sshd: ALL" }
loop_control:
label: "{{ item.content }}"

View File

@@ -29,6 +29,8 @@
- { option: ClientAliveCountMax, value: "1" }
- { option: PermitTunnel, value: "no" }
- { option: Banner, value: /etc/issue.net }
loop_control:
label: "{{ item.option }}"
- name: Detect target OpenSSH version
ansible.builtin.shell: >-