Skip to content

Commit

Permalink
Merge pull request #85 from olhado/checkmode-change
Browse files Browse the repository at this point in the history
Address a situation in check mode where the auditd stop/disable tasks…
  • Loading branch information
olhado authored Sep 16, 2021
2 parents 54d04a3 + 7cd6317 commit a888287
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ platforms:
- yum install -y audit initscripts
- sed -i 's/local_events = yes/local_events = no/g' /etc/audit/auditd.conf
- systemctl enable auditd.service
image: centos:7
- name: centos-7
driver_config:
image: centos:7
Expand Down
2 changes: 2 additions & 0 deletions tasks/disable_auditd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
- name: Stop service auditd
command: service auditd stop
when: auditd_status.rc == 0
ignore_errors: "{{ ansible_check_mode }}"
args:
warn: no

- name: Disable service auditd
command: systemctl disable auditd
when: auditd_status.rc == 0
ignore_errors: "{{ ansible_check_mode }}"
args:
warn: no

0 comments on commit a888287

Please sign in to comment.