Skip to content

Commit 4ed7941

Browse files
Christoph SieberChristoph Sieber
authored andcommitted
os_hardening: disable systemd audit logging
disable audit logging via systemd-journald when enabling auditd as this leads to duplicate logs in the journal or even /var/log/messages depending on the configuration Signed-off-by: Christoph Sieber <[email protected]>
1 parent 9976169 commit 4ed7941

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

roles/os_hardening/handlers/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,8 @@
2727
path: "{{ item }}"
2828
state: remounted
2929
loop: "{{ mountpoints_changed }}"
30+
31+
- name: Restart journald
32+
ansible.builtin.systemd:
33+
name: systemd-journald.service
34+
state: restarted

roles/os_hardening/tasks/auditd.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,13 @@
1616
- Restart auditd via service
1717
- Restart auditd via systemd
1818
tags: auditd
19+
20+
- name: Disable systemd-journald.audit
21+
ansible.builtin.systemd:
22+
name: systemd-journald-audit.socket
23+
state: stopped
24+
enabled: false
25+
masked: true
26+
notify:
27+
- Restart journald
28+
tags: auditd

0 commit comments

Comments
 (0)