forked from ansible-lockdown/RHEL9-CIS
with_items to loop
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
This commit is contained in:
parent
904d7811d4
commit
8694bfde75
4 changed files with 8 additions and 14 deletions
|
|
@ -48,8 +48,7 @@
|
|||
regexp: '^([^#|{% if system_is_ec2 %}ec2-user{% endif %}].*)NOPASSWD(.*)'
|
||||
replace: '\1PASSWD\2'
|
||||
validate: '/usr/sbin/visudo -cf %s'
|
||||
with_items:
|
||||
- "{{ rhel9cis_sudoers_files.stdout_lines }}"
|
||||
loop: "{{ rhel9cis_sudoers_files.stdout_lines }}"
|
||||
when:
|
||||
- rhel9cis_rule_5_3_4
|
||||
tags:
|
||||
|
|
@ -65,8 +64,7 @@
|
|||
regexp: '^([^#].*)!authenticate(.*)'
|
||||
replace: '\1authenticate\2'
|
||||
validate: '/usr/sbin/visudo -cf %s'
|
||||
with_items:
|
||||
- "{{ rhel9cis_sudoers_files.stdout_lines }}"
|
||||
loop: "{{ rhel9cis_sudoers_files.stdout_lines }}"
|
||||
when:
|
||||
- rhel9cis_rule_5_3_5
|
||||
tags:
|
||||
|
|
@ -98,8 +96,7 @@
|
|||
regexp: 'timestamp_timeout=(\d+)'
|
||||
replace: "timestamp_timeout={{ rhel9cis_sudo_timestamp_timeout }}"
|
||||
validate: '/usr/sbin/visudo -cf %s'
|
||||
with_items:
|
||||
- "{{ rhel9cis_5_3_6_timeout_files.stdout_lines }}"
|
||||
loop: "{{ rhel9cis_5_3_6_timeout_files.stdout_lines }}"
|
||||
when: rhel9cis_5_3_6_timeout_files.stdout | length > 0
|
||||
when:
|
||||
- rhel9cis_rule_5_3_6
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue