Skip to content

Commit 9a0c68e

Browse files
author
Mason Morales
authored
Merge pull request #43 from arengifoc/bugfix/42/auditd-restart
Modified conditional handlers for restarting auditd in redhat and non redhat Linux distributions
2 parents ea967db + d3ae0bc commit 9a0c68e

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

roles/splunk/handlers/main.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@
7777
state: restarted
7878
become: true
7979

80-
- name: restart auditd service
80+
- name: restart redhat auditd service
8181
command: service auditd condrestart
8282
become: true
83+
when: ansible_os_family == 'RedHat'
84+
85+
- name: restart non-redhat auditd service
86+
service:
87+
name: auditd
88+
state: restarted
89+
become: true
90+
when: ansible_os_family != 'RedHat'

roles/splunk/tasks/configure_facl.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@
3636
option: log_group
3737
value: "{{ splunk_nix_group }}"
3838
become: true
39-
notify: restart auditd service
40-
ignore_errors: true
39+
notify:
40+
- restart redhat auditd service
41+
- restart non-redhat auditd service
4142
when: result_auditd_conf.stat.exists
4243

4344
when: splunk_nix_user != 'root'

0 commit comments

Comments
 (0)