Override the default syslog logrotate on notifs-backend01 as its messaages log grows
very very large over time. Rotate it daily, compress with xz and only keep 7 days. Can adjust from there.
This commit is contained in:
parent
6309062daa
commit
2d34c72c58
2 changed files with 26 additions and 0 deletions
20
roles/notifs/backend/files/syslog-logrotate
Normal file
20
roles/notifs/backend/files/syslog-logrotate
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
/var/log/cron
|
||||||
|
/var/log/maillog
|
||||||
|
/var/log/messages
|
||||||
|
/var/log/secure
|
||||||
|
/var/log/spooler
|
||||||
|
{
|
||||||
|
sharedscripts
|
||||||
|
postrotate
|
||||||
|
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
|
||||||
|
endscript
|
||||||
|
daily
|
||||||
|
rotate 7
|
||||||
|
missingok
|
||||||
|
ifempty
|
||||||
|
compress
|
||||||
|
compresscmd /usr/bin/xz
|
||||||
|
uncompresscmd /usr/bin/xz
|
||||||
|
compressext .xz
|
||||||
|
dateext
|
||||||
|
}
|
|
@ -40,3 +40,9 @@
|
||||||
tags:
|
tags:
|
||||||
- notifs
|
- notifs
|
||||||
- notifs/backend
|
- notifs/backend
|
||||||
|
|
||||||
|
- name: override the default syslog logrotate file
|
||||||
|
copy: src=syslog-logrotate dest=/etc/logrotate.d/syslog
|
||||||
|
tags:
|
||||||
|
- notifs
|
||||||
|
- notifs/backend
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue