mirror of
https://github.com/dev-sec/ansible-collection-hardening
synced 2024-11-10 17:24:12 +00:00
remove omit param in default()
This commit is contained in:
parent
5c48c74f79
commit
e0e2b2a601
4 changed files with 4 additions and 4 deletions
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
- name: delete rhosts-files from system | DTAG SEC Req 3.21-4
|
- name: delete rhosts-files from system | DTAG SEC Req 3.21-4
|
||||||
file: dest='~{{ item }}/.rhosts' state=absent
|
file: dest='~{{ item }}/.rhosts' state=absent
|
||||||
with_items: '{{ users.stdout_lines | default(omit) }}'
|
with_items: '{{ users.stdout_lines | default() }}'
|
||||||
|
|
||||||
- name: delete hosts.equiv from system | DTAG SEC Req 3.21-4
|
- name: delete hosts.equiv from system | DTAG SEC Req 3.21-4
|
||||||
file: dest='/etc/hosts.equiv' state=absent
|
file: dest='/etc/hosts.equiv' state=absent
|
||||||
|
|
|
@ -20,5 +20,5 @@
|
||||||
- name: remove suid/sgid bit from all binaries except in system and user whitelist
|
- name: remove suid/sgid bit from all binaries except in system and user whitelist
|
||||||
file: path='{{item}}' mode='a-s' state=file follow=yes
|
file: path='{{item}}' mode='a-s' state=file follow=yes
|
||||||
with_items:
|
with_items:
|
||||||
- '{{ suid | default(omit) | difference(os_security_suid_sgid_whitelist) }}'
|
- '{{ suid | default() | difference(os_security_suid_sgid_whitelist) }}'
|
||||||
when: os_security_suid_sgid_remove_from_unknown
|
when: os_security_suid_sgid_remove_from_unknown
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
- name: create a combined sysctl-dict if overwrites are defined
|
- name: create a combined sysctl-dict if overwrites are defined
|
||||||
set_fact: sysctl_config="{{ sysctl_config | combine(sysctl_overwrite) }}"
|
set_fact: sysctl_config="{{ sysctl_config | combine(sysctl_overwrite) }}"
|
||||||
when: sysctl_overwrite | default(omit)
|
when: sysctl_overwrite | default()
|
||||||
|
|
||||||
- name: Change various sysctl-settings, look at the sysctl-vars file for documentation
|
- name: Change various sysctl-settings, look at the sysctl-vars file for documentation
|
||||||
sysctl:
|
sysctl:
|
||||||
|
|
|
@ -32,4 +32,4 @@
|
||||||
- name: change system accounts not on the user provided ignore-list
|
- name: change system accounts not on the user provided ignore-list
|
||||||
user: name='{{item}}' shell='{{os_nologin_shell_path}}' password='*'
|
user: name='{{item}}' shell='{{os_nologin_shell_path}}' password='*'
|
||||||
with_items:
|
with_items:
|
||||||
- '{{sys_accs_cond | default(omit) | difference(os_ignore_users) | list }}'
|
- '{{sys_accs_cond | default() | difference(os_ignore_users) | list }}'
|
||||||
|
|
Loading…
Reference in a new issue