File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 138138 - always
139139
140140- name : " PRELIM | PATCH | Ensure auditd is installed"
141- block :
142- - name : " PRELIM | PATCH | Ensure auditd is installed"
143- ansible.builtin.package :
144- name : ['auditd', 'audispd-plugins']
145- state : present
146- when :
147- - " 'auditd' not in ansible_facts.packages or
148- 'auditd-plugins' not in ansible_facts.packages"
149-
150- - name : " PRELIM | AUDIT | Audit conf and rules files | list files"
151- ansible.builtin.find :
152- path : /etc/audit/
153- file_type : file
154- recurse : true
155- patterns : ' *.conf,*.rules'
156- register : auditd_conf_files
157-
141+ ansible.builtin.package :
142+ name : ['auditd', 'audispd-plugins']
143+ state : present
158144 when :
159- - ubtu22cis_rule_4_1_1_1 or
160- ubtu22cis_rule_4_1_4_5 or
161- ubtu22cis_rule_4_1_4_6 or
162- ubtu22cis_rule_4_1_4_7
145+ - " 'auditd' not in ansible_facts.packages or
146+ 'auditd-plugins' not in ansible_facts.packages"
147+ - ubtu22cis_rule_4_1_1_1
163148 tags :
164149 - level2-server
165150 - level2-workstation
166151 - patch
167152 - auditd
168153 - always
169154
155+ - name : " PRELIM | AUDIT | Audit conf and rules files | list files"
156+ ansible.builtin.find :
157+ path : /etc/audit/
158+ file_type : file
159+ recurse : true
160+ patterns : ' *.conf,*.rules'
161+ register : auditd_conf_files
162+ tags :
163+ - patch
164+ - auditd
165+ - always
166+
170167- name : " PRELIM | AUDIT | Check if auditd is immutable before changes"
171168 ansible.builtin.shell : auditctl -l | grep -c '-e 2'
172169 changed_when : false
Original file line number Diff line number Diff line change 2121 owner : root
2222 group : root
2323 mode : ' 0644'
24+ failed_when : discovered_file_exists.state not in '[ file, absent ]'
25+ register : discovered_file_exists
2426 when :
2527 - ubtu22cis_rule_6_1_2
2628 tags :
You can’t perform that action at this time.
0 commit comments