SimpliField / ansible-logrotate

🤖 Ansible role to setup logrotate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Logrotate Build Status Ansible Role

Setup logrotate

Requirements

Need ansible 2

Role Variables

logrotate_include_dir: /etc/logrotate.d
logrotate_options:
- weekly
- su root syslog
- rotate 4
- create

logrotate_wtmp:
  logs:
  - /var/log/wtmp
  options:
  - missingok
  - monthly
  - create 0664 root utmp
  - rotate 1

logrotate_btmp:
  logs:
  - /var/log/btmp
  options:
  - missingok
  - monthly
  - create 0660 root utmp
  - rotate 1

logrotate_applications: []

Dependencies

There is no dependencies

Example Playbook

- hosts: servers
  roles:
  - role: SimpliField.logrotate
    logrotate_applications:
    - name: apt
      definitions:
      - logs:
        - /var/log/apt/term.log
        - /var/log/apt/history.log
        options:
          - rotate 12
          - monthly
          - missingok
          - notifempty
          - compress

License

BSD

About

🤖 Ansible role to setup logrotate