A library which manages log rotate configurations.
- Ansible >= 2.2
None
- hosts: servers
tasks:
- name: Rotate /var/log/tomcat/myapp.log
logrotate: name=myapp
path=/var/log/tomcat/myapp.log
args:
options:
- daily
- rotate 8
- postrotate
- exec script
- endscript
- name: rotate /var/log/wibble.log
logrotate:
name: wibble-log
path: '/var/log/wibble*.log'
options:
- daily
- size +1M
- rotate 7
- missingok
- copytruncate
- compress
Tests are performed by Molecule.
$ tox
MIT