https://github.com/retr0h/ansible-logrotate
https://github.com/retr0h/ansible-logrotate
ansible ansible-library logrotate
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/retr0h/ansible-logrotate
- Owner: retr0h
- License: mit
- Created: 2014-07-17T02:59:32.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2018-10-08T21:23:31.000Z (over 7 years ago)
- Last Synced: 2024-12-26T14:51:23.521Z (over 1 year ago)
- Topics: ansible, ansible-library, logrotate
- Language: Python
- Size: 36.1 KB
- Stars: 8
- Watchers: 3
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ansible-roles - logrotate - A role which manages the logrotate package, and provides a means to manage specific log rotate configurations. (Security / Logging and Monitoring)
README
logrotate
=========
A library which manages log rotate configurations.
Library ready status
--------------------
[](https://travis-ci.org/retr0h/ansible-logrotate)
[](https://galaxy.ansible.com/list#/roles/1131)
Requirements
------------
* Ansible >= 2.2
Dependencies
------------
None
Example Playbook
----------------
- 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
Testing
-------
Tests are performed by [Molecule](http://molecule.readthedocs.org/en/latest/).
$ tox
License
-------
MIT