File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 3535 - name : " initialize temp variables"
3636 set_fact :
3737 selinux_problems : 0
38+ # use list to convert selinux avc denials from all nodes into list of unique patterns from all of them together
39+ selinux_problems_list : []
3840 segfault_problems : 0
3941 oom_killer_problems : 0
4042 counted_hosts : " {{ groups['all'] | difference( groups['local'] + (groups['tester'] | default([]) | difference(groups['controller']|default([]))) ) }}"
4446
4547 - name : " add together all issue counts from all hosts except localhost and tester"
4648 set_fact :
47- selinux_problems : " {{ selinux_problems | int + ( hostvars[item]['selinux_problems_found'] | default([]) | length ) }}"
49+ selinux_problems_list : " {{ selinux_problems_list + (hostvars[item]['selinux_problems_found'] | default([])) }}"
50+ selinux_problems : " {{ selinux_problems_list | length }}"
4851 segfault_problems : " {{ segfault_problems | int + ( hostvars[item]['segfault_problems_found'] | default([]) | length ) }}"
4952 oom_killer_problems : " {{ oom_killer_problems | int + ( hostvars[item]['oom_killer_problems_found'] | default([]) | length ) }}"
5053 with_items : " {{ counted_hosts }}"
Original file line number Diff line number Diff line change 181181
182182- name : Search for AVC denied
183183 become : yes
184- shell : " ! grep -i denied /var/log/audit/audit*"
184+ # sed used to replace numeric runtime/instance values, to reduce list of occurencies to their patterns
185+ shell : " ! (grep -i denied /var/log/audit/* | sed -r 's/audit\\ (.*\\ ): avc/audit(...): avc/; s/(pid|ino)=[0-9]+ /\\ 1=... /g'|sort -u)"
185186 register : result
186187 ignore_errors : yes
187188
You can’t perform that action at this time.
0 commit comments