File tree Expand file tree Collapse file tree 7 files changed +13
-13
lines changed Expand file tree Collapse file tree 7 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 33 apt :
44 name : ' {{ os_security_packages_list }}'
55 state : ' absent'
6- when : ' os_security_packages_clean'
6+ when : os_security_packages_clean | bool
Original file line number Diff line number Diff line change 1515
1616- import_tasks : auditd.yml
1717 tags : auditd
18- when : os_auditd_enabled
18+ when : os_auditd_enabled | bool
1919
2020- import_tasks : limits.yml
2121 tags : limits
3939 tags : securetty
4040
4141- import_tasks : suid_sgid.yml
42- when : os_security_suid_sgid_enforce
42+ when : os_security_suid_sgid_enforce | bool
4343 tags : suid_sgid
4444
4545- import_tasks : sysctl.yml
Original file line number Diff line number Diff line change 2525 group : ' root'
2626 mode : ' 0440'
2727
28- when : ' not os_security_kernel_enable_core_dump'
28+ when : not os_security_kernel_enable_core_dump | bool
2929
3030- name : remove 10.hardcore.conf config file
3131 file :
3232 path : /etc/security/limits.d/10.hardcore.conf
3333 state : absent
34- when : ' os_security_kernel_enable_core_dump'
34+ when : os_security_kernel_enable_core_dump | bool
Original file line number Diff line number Diff line change 11---
22
33- import_tasks : hardening.yml
4- when : os_hardening_enabled
4+ when : os_hardening_enabled | bool
Original file line number Diff line number Diff line change 66 owner : ' root'
77 group : ' root'
88 mode : ' 0750'
9- when : not os_security_kernel_enable_core_dump
9+ when : not os_security_kernel_enable_core_dump | bool
1010
1111- name : remove pinerolo_profile.sh from profile.d
1212 file :
1313 path : /etc/profile.d/pinerolo_profile.sh
1414 state : absent
15- when : os_security_kernel_enable_core_dump
15+ when : os_security_kernel_enable_core_dump | bool
Original file line number Diff line number Diff line change 1313- name : find binaries with suid/sgid set | os-06
1414 shell : find / -xdev \( -perm -4000 -o -perm -2000 \) -type f ! -path '/proc/*' -print 2>/dev/null
1515 register : sbit_binaries
16- when : os_security_suid_sgid_remove_from_unknown
16+ when : os_security_suid_sgid_remove_from_unknown | bool
1717 changed_when : False
1818
1919- name : gather files from which to remove suids/sgids and remove system white-listed files | os-06
2020 set_fact :
2121 suid : ' {{ sbit_binaries.stdout_lines | difference(os_security_suid_sgid_system_whitelist) }}'
22- when : os_security_suid_sgid_remove_from_unknown
22+ when : os_security_suid_sgid_remove_from_unknown | bool
2323
2424- name : remove suid/sgid bit from all binaries except in system and user whitelist | os-06
2525 file :
2929 follow : ' yes'
3030 with_flattened :
3131 - ' {{ suid | default([]) | difference(os_security_suid_sgid_whitelist) }}'
32- when : os_security_suid_sgid_remove_from_unknown
32+ when : os_security_suid_sgid_remove_from_unknown | bool
Original file line number Diff line number Diff line change 77 - ' CentOS-Debuginfo'
88 - ' CentOS-Media'
99 - ' CentOS-Vault'
10- when : os_security_packages_clean
10+ when : os_security_packages_clean | bool
1111
1212- name : get yum-repository-files
1313 shell : ' find /etc/yum.repos.d/ -type f -name *.repo'
3838 yum :
3939 name : ' {{ os_security_packages_list }}'
4040 state : ' absent'
41- when : os_security_packages_clean
41+ when : os_security_packages_clean | bool
You can’t perform that action at this time.
0 commit comments