Skip to content

Commit

Permalink
add restart-auditd handler as after configuration change (e.g. of os_…
Browse files Browse the repository at this point in the history
…auditd_max_log_file_action) you need to restart. Sadly on rhel7 systems you cannot use systemd. And as debian derivates use service as alias and it works I kept it that simple. also adding 'auditd'-tag to make it easy only run that config change if needed.
  • Loading branch information
Felix Herzog committed Feb 13, 2020
1 parent 060b15a commit af3b648
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
- name: update-initramfs
command: 'update-initramfs -u'

- name: restart-auditd
command:
cmd: 'service auditd restart' # rhel: see: https://access.redhat.com/solutions/2664811
warn: no # sadly 'service' module fails in that case also by using 'use: service'
3 changes: 3 additions & 0 deletions tasks/auditd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
package:
name: '{{ auditd_package }}'
state: 'present'
tags: auditd

- name: configure auditd | package-08
template:
Expand All @@ -12,3 +13,5 @@
owner: 'root'
group: 'root'
mode: '0640'
notify: 'restart-auditd'
tags: auditd

0 comments on commit af3b648

Please sign in to comment.