Name: ansible-logrotate
Owner: Zapier
Description: Ansible Galaxy role to setup logrotate and additional rotation scripts
Created: 2015-11-14 11:26:24.0
Updated: 2015-11-12 20:04:50.0
Pushed: 2015-11-14 11:27:50.0
Size: 352
Language: null
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Installs logrotate and provides an easy way to setup additional logrotate scripts by specifying a list of directives.
None
logrotate_scripts: A list of logrotate scripts and the directives to use for the rotation.
otate_scripts:
name: rails
path: "/srv/current/log/*.log"
options:
- weekly
- size 25M
- missingok
- compress
- delaycompress
- copytruncate
None
Setting up logrotate for additional Nginx logs, with postrotate script.
otate_scripts:
name: nginx
path: /var/log/nginx/*.log
options:
- weekly
- size 25M
- rotate 7
- missingok
- compress
- delaycompress
- copytruncate
scripts:
postrotate: "[ -s /run/nginx.pid ] && kill -USR1 `cat /run/nginx.pid`"
BSD
Find Nick Hammond on Twitter.