forked from infra/ansible
common: set journald retention time to 7days
This commit is contained in:
parent
8a25f21a87
commit
611a14fffb
@ -1,4 +1,7 @@
|
||||
---
|
||||
|
||||
- name: Restart journald
|
||||
service: name=systemd-journald state=restarted
|
||||
|
||||
- name: update-initramfs
|
||||
command: update-initramfs -u -k all
|
||||
|
@ -55,3 +55,11 @@
|
||||
path: /etc/pam.d/su
|
||||
regexp: '^.*auth\s+required\s+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
|
||||
|
Loading…
Reference in New Issue
Block a user