Skip to content

Commit a888287

Browse files
authored
Merge pull request #85 from olhado/checkmode-change
Address a situation in check mode where the auditd stop/disable tasks…
2 parents 54d04a3 + 7cd6317 commit a888287

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.kitchen.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ platforms:
6060
- yum install -y audit initscripts
6161
- sed -i 's/local_events = yes/local_events = no/g' /etc/audit/auditd.conf
6262
- systemctl enable auditd.service
63-
image: centos:7
6463
- name: centos-7
6564
driver_config:
6665
image: centos:7

tasks/disable_auditd.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@
99
- name: Stop service auditd
1010
command: service auditd stop
1111
when: auditd_status.rc == 0
12+
ignore_errors: "{{ ansible_check_mode }}"
1213
args:
1314
warn: no
1415

1516
- name: Disable service auditd
1617
command: systemctl disable auditd
1718
when: auditd_status.rc == 0
19+
ignore_errors: "{{ ansible_check_mode }}"
1820
args:
1921
warn: no

0 commit comments

Comments
 (0)