common: set journald retention time to 7days

This commit is contained in:
Markus 2020-01-27 20:35:23 +01:00
parent 8a25f21a87
commit 611a14fffb
2 changed files with 11 additions and 0 deletions

View File

@ -1,4 +1,7 @@
--- ---
- name: Restart journald
service: name=systemd-journald state=restarted
- name: update-initramfs - name: update-initramfs
command: update-initramfs -u -k all command: update-initramfs -u -k all

View File

@ -55,3 +55,11 @@
path: /etc/pam.d/su path: /etc/pam.d/su
regexp: '^.*auth\s+required\s+pam_wheel.so$' regexp: '^.*auth\s+required\s+pam_wheel.so$'
line: 'auth required pam_wheel.so' line: 'auth required pam_wheel.so'
- name: Configure journald retention
lineinfile:
path: "/etc/systemd/journald.conf"
state: "present"
regexp: "^#?MaxRetentionSec=.*"
line: "MaxRetentionSec=7day"
notify: Restart journald