forked from infra/ansible
people: Use our rsyslog-logrotate to compress, anubis msgs ftw.
Signed-off-by: James Antill <james@and.org>
This commit is contained in:
parent
03114092f4
commit
d574d28433
2 changed files with 28 additions and 0 deletions
17
roles/people/files/rsyslog-logrotate
Normal file
17
roles/people/files/rsyslog-logrotate
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
/var/log/cron
|
||||
/var/log/maillog
|
||||
/var/log/messages
|
||||
/var/log/secure
|
||||
/var/log/spooler
|
||||
{
|
||||
missingok
|
||||
sharedscripts
|
||||
postrotate
|
||||
/usr/bin/systemctl reload rsyslog.service >/dev/null 2>&1 || true
|
||||
endscript
|
||||
compress
|
||||
compresscmd /usr/bin/xz
|
||||
uncompresscmd /usr/bin/xz
|
||||
compressext .xz
|
||||
dateext
|
||||
}
|
||||
|
|
@ -308,3 +308,14 @@
|
|||
- config
|
||||
notify:
|
||||
- Restart sssd
|
||||
|
||||
# We don't have much space on / and anubis makes messages big, default
|
||||
# doesn't compress rotations and this does.
|
||||
- name: People log rotate
|
||||
ansible.builtin.copy: src=rsyslog-logrotate dest=/etc/logrotate.d/rsyslog mode=0644
|
||||
notify:
|
||||
- Restart rsyslog
|
||||
tags:
|
||||
- rsyslogd
|
||||
- config
|
||||
- base
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue