Merge "Exit with zero status when denials are not found in audit log"

This commit is contained in:
Zuul 2020-12-04 12:41:11 +00:00 committed by Gerrit Code Review
commit 1614ef0fb4
1 changed files with 2 additions and 2 deletions

View File

@ -53,11 +53,11 @@
- name: Fetch denials from auditlog
become: true
ignore_errors: true
failed_when: false
changed_when: false
shell: |
set -o pipefail
grep denied {{ validate_selinux_audit_source }} > /tmp/denials.log
grep -i denied {{ validate_selinux_audit_source }} > /tmp/denials.log || (echo "No denials found in auditlog"; exit 0)
- name: Get stat for denials.log
stat: