Skip to content

Commit

Permalink
Merge pull request #43 from arengifoc/bugfix/42/auditd-restart
Browse files Browse the repository at this point in the history
Modified conditional handlers for restarting auditd in redhat and non redhat Linux distributions
  • Loading branch information
Mason Morales authored Mar 3, 2021
2 parents ea967db + d3ae0bc commit 9a0c68e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
10 changes: 9 additions & 1 deletion roles/splunk/handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@
state: restarted
become: true

- name: restart auditd service
- name: restart redhat auditd service
command: service auditd condrestart
become: true
when: ansible_os_family == 'RedHat'

- name: restart non-redhat auditd service
service:
name: auditd
state: restarted
become: true
when: ansible_os_family != 'RedHat'
5 changes: 3 additions & 2 deletions roles/splunk/tasks/configure_facl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@
option: log_group
value: "{{ splunk_nix_group }}"
become: true
notify: restart auditd service
ignore_errors: true
notify:
- restart redhat auditd service
- restart non-redhat auditd service
when: result_auditd_conf.stat.exists

when: splunk_nix_user != 'root'

0 comments on commit 9a0c68e

Please sign in to comment.