diff --git a/.kitchen.yml b/.kitchen.yml index bd914b7..8594fb5 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -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 diff --git a/tasks/disable_auditd.yml b/tasks/disable_auditd.yml index e256107..ef3e5d6 100644 --- a/tasks/disable_auditd.yml +++ b/tasks/disable_auditd.yml @@ -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