refactor: add loop_control labels to dict-based loops across all roles
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 }}"
|
||||
|
||||
@@ -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: >-
|
||||
|
||||
Reference in New Issue
Block a user