Setup logrotate for merged logs.

This commit is contained in:
Kevin Fenzi 2014-07-16 22:10:52 +00:00
parent 652e84ff8d
commit 59df5e6b4b
2 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1,11 @@
/var/log/merged/*.log {
missingok
rotate 1
nodateext
daily
create 0644 root root
copytruncate
compress
compresscmd /usr/bin/xz
uncompresscmd /usr/bin/xz
}

View file

@ -131,6 +131,16 @@
- config
- base
- name: rsyslog log rotate for rsyslog servers
copy: src=rsyslog/merged-rsyslog dest=/etc/logrotate.d/merged-rsyslog mode=644
when: inventory_hostname.startswith('log')
notify:
- restart rsyslog
tags:
- rsyslogd
- config
- base
- name: add rsyslog config to /etc/rsyslog.d
copy: src={{ item }} dest=/etc/rsyslog.d/ owner=root group=root mode=0644
with_fileglob: