add separate handlers for audit restart
Signed-off-by: Martin Schurz <[email protected]>
This commit is contained in:
1 parent
84c43c0550
commit
60d10811d4
1 file changed
+11
-1
@@ -2,10 +2,20 @@
|
||||
- name: Update-initramfs # noqa no-changed-when
|
||||
ansible.builtin.command: update-initramfs -u
|
||||
|
||||
- name: Restart auditd
|
||||
ansible.builtin.systemd:
|
||||
name: auditd
|
||||
state: restarted
|
||||
when:
|
||||
- molecule_yml.driver.name | default() != "docker" # restarting auditd in a container does not
|
||||
- not ansible_facts.os_family == 'RedHat'
|
||||
|
||||
- name: Restart auditd # noqa command-instead-of-module no-changed-when
|
||||
ansible.builtin.command:
|
||||
cmd: service auditd restart # rhel: see: https://access.redhat.com/solutions/2664811
|
||||
when: molecule_yml.driver.name | default() != "docker" # restarting auditd in a container does not work
|
||||
when:
|
||||
- molecule_yml.driver.name | default() != "docker" # restarting auditd in a container does not work
|
||||
- ansible_facts.os_family == 'RedHat'
|
||||
|
||||
- name: Reload systemd
|
||||
ansible.builtin.systemd:
|
||||
|
||||
Reference in new issue
Block a user