Repository URL to install this package:
|
Version:
1.0.0b1 ▾
|
| .. |
| defaults |
| meta |
| tasks |
| templates |
| tests |
| .gitignore |
| .travis.yml |
| LICENSE |
| README.md |
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.
logrotate_scripts:
- name: rails
path: "/srv/current/log/*.log"
options:
- weekly
- size 25M
- missingok
- compress
- delaycompress
- copytruncate
logrotate_scripts:
- name: rails
paths:
- "/srv/current/scare.log"
- "/srv/current/hide.log"
options:
- weekly
- size 25M
- missingok
- compress
- delaycompress
- copytruncate
None
Setting up logrotate for additional Nginx logs, with postrotate script.
- hosts: all
vars:
logrotate_scripts:
- name: nginx-options
path: /var/log/nginx/options.log
options:
- daily
- weekly
- size 25M
- rotate 7
- missingok
- compress
- delaycompress
- copytruncate
- name: nginx-scripts
path: /var/log/nginx/scripts.log
options:
- daily
- weekly
- size 25M
scripts:
postrotate: "echo test"
roles:
- ansible-logrotate
This role is already configured to run on travis CI within a test playbook but it's useful to be able to run and debug a role locally which can be done via Vagrant and the ansible_local provisioner.
To run the test playbook locally within a Vagrant virtual machine:
cd tests
vagrant up --provision