summaryrefslogtreecommitdiffstats
path: root/roles/nickhammond.logrotate/README.md
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2015-10-29 11:14:51 -0400
committerKenny Woodson <kwoodson@redhat.com>2015-10-29 11:14:51 -0400
commit9bbaa824da5e1a049cdec1a6523c3841d713386c (patch)
tree93e80f1577ad0f2f5f8931b493c50cd9aa657c77 /roles/nickhammond.logrotate/README.md
parent15df494fb781dd1509854eeb366e981930b52c22 (diff)
parent16d1bce0be2f8c3942489630adcb7030aecadc55 (diff)
downloadopenshift-9bbaa824da5e1a049cdec1a6523c3841d713386c.tar.gz
openshift-9bbaa824da5e1a049cdec1a6523c3841d713386c.tar.bz2
openshift-9bbaa824da5e1a049cdec1a6523c3841d713386c.tar.xz
openshift-9bbaa824da5e1a049cdec1a6523c3841d713386c.zip
Merge pull request #763 from openshift/master
Merge master into prod.
Diffstat (limited to 'roles/nickhammond.logrotate/README.md')
-rw-r--r--roles/nickhammond.logrotate/README.md71
1 files changed, 71 insertions, 0 deletions
diff --git a/roles/nickhammond.logrotate/README.md b/roles/nickhammond.logrotate/README.md
new file mode 100644
index 000000000..602b5ef6c
--- /dev/null
+++ b/roles/nickhammond.logrotate/README.md
@@ -0,0 +1,71 @@
+[![Build Status](https://travis-ci.org/nickhammond/ansible-logrotate.svg?branch=master)](https://travis-ci.org/nickhammond/ansible-logrotate)
+
+Role Name
+========
+
+Installs logrotate and provides an easy way to setup additional logrotate scripts by specifying a list of directives.
+
+Requirements
+------------
+
+None
+
+Role Variables
+--------------
+
+**logrotate_scripts**: A list of logrotate scripts and the directives to use for the rotation.
+
+* name - The name of the script that goes into /etc/logrotate.d/
+* path - Path to point logrotate to for the log rotation
+* options - List of directives for logrotate, view the logrotate man page for specifics
+* scripts - Dict of scripts for logrotate (see Example below)
+
+```
+logrotate_scripts:
+ - name: rails
+ path: "/srv/current/log/*.log"
+ options:
+ - weekly
+ - size 25M
+ - missingok
+ - compress
+ - delaycompress
+ - copytruncate
+```
+
+Dependencies
+------------
+
+None
+
+Example Playbook
+-------------------------
+
+Setting up logrotate for additional Nginx logs, with postrotate script.
+
+```
+logrotate_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`"
+
+```
+
+License
+-------
+
+BSD
+
+Author Information
+------------------
+
+Find [Nick Hammond]( http://www.nickhammond.com ) on [Twitter](http://twitter.com/nickhammond).