Skip to content

WebbyLab/ansible-role-logrotate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logrotate

Log rotation for your application.

Rotation configuration:

{{logrotate_logfile}} {
    daily
    missingok
    rotate {{logrotate_rotate}}
    compress
    delaycompress
    notifempty
    create 600 {{logroate_user}} {{logrotate_group}}
}

Role Variables

logrotate_name: web-app
logrotate_logfile: /home/web-app/web-app/logs/debug.log
logrotate_user: ubuntu
logrotate_group: ubuntu
logrotate_rotate: 14

Example Playbook

- hosts: servers
  roles:
     - role: WebbyLab.logrotate
       logrotate_name: web-app
       logrotate_logfile: /home/web-app/web-app/logs/debug.log
       logrotate_user: ubuntu
       logrotate_group: ubuntu
       logrotate_rotate: 14

License

MIT

Author Information

WebbyLab (http://webbylab.com)

About

Ansible role for configuring log rotation of your app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors