Files
ansible-collection-hardening/roles/os_hardening/handlers/main.yml
T
Jacob Sievert ade6deeba2 Updates handlers for new ansible syntax and deprecated options for legacy commands (#602)
* Update main.yml

fixes the handler file and set new syntax

Signed-off-by: Jacob Sievert <[email protected]>

* changes command module from legacy to builtin.

Signed-off-by: Jacob Sievert <[email protected]>

Signed-off-by: Jacob Sievert <[email protected]>
2022-11-24 08:39:05 +01:00

19 lines
514 B
YAML

---
- name: Update-initramfs
ansible.builtin.command: 'update-initramfs -u'
- name: Restart auditd
ansible.builtin.command:
cmd: 'service auditd restart' # rhel: see: https://access.redhat.com/solutions/2664811
when: molecule_yml is not defined # restarting auditd in a container does not work
- name: Reload systemd
ansible.builtin.systemd:
daemon_reload: true
- name: Remount filesystems
ansible.posix.mount:
path: "{{ item }}"
state: remounted
loop: "{{ mountpoints_changed }}"