Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
fixes the handler file and set new syntax
  • Loading branch information
jsievertde authored Nov 23, 2022
1 parent 66f5c6b commit e90c8d5
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions roles/os_hardening/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
---
- name: Update-initramfs
command: 'update-initramfs -u'
ansible.legacy.command: 'update-initramfs -u'

- name: Restart auditd
command:
ansible.legacy.command:
cmd: 'service auditd restart' # rhel: see: https://access.redhat.com/solutions/2664811
warn: false # sadly 'service' module fails in that case also by using 'use: service'
when: molecule_yml is not defined # restarting auditd in a container does not work

- name: Reload systemd
systemd:
ansible.builtin.systemd:
daemon_reload: true

- name: Remount filesystems
mount:
ansible.posix.mount:
path: "{{ item }}"
state: remounted
loop: "{{ mountpoints_changed }}"

0 comments on commit e90c8d5

Please sign in to comment.