diff options
author | Troy Dawson <tdawson@redhat.com> | 2015-08-27 10:27:46 -0500 |
---|---|---|
committer | Troy Dawson <tdawson@redhat.com> | 2015-08-27 15:19:45 -0500 |
commit | f0d03d257f2186c91e99c06e34be737468ea6ad6 (patch) | |
tree | be5ad866e94abe66ed76aad2f98a31ae8229f645 /roles/nickhammond.logrotate/templates | |
parent | 5c7e1366ad8ae67ef23117d296a65a6ee81ccd29 (diff) | |
download | openshift-f0d03d257f2186c91e99c06e34be737468ea6ad6.tar.gz openshift-f0d03d257f2186c91e99c06e34be737468ea6ad6.tar.bz2 openshift-f0d03d257f2186c91e99c06e34be737468ea6ad6.tar.xz openshift-f0d03d257f2186c91e99c06e34be737468ea6ad6.zip |
Add a role that allows logrotate config editing.
This role gets called for each type of machine, but
if logrotate_scripts is not set, nothing happens.
Diffstat (limited to 'roles/nickhammond.logrotate/templates')
-rw-r--r-- | roles/nickhammond.logrotate/templates/logrotate.d.j2 | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/roles/nickhammond.logrotate/templates/logrotate.d.j2 b/roles/nickhammond.logrotate/templates/logrotate.d.j2 new file mode 100644 index 000000000..6453be6b2 --- /dev/null +++ b/roles/nickhammond.logrotate/templates/logrotate.d.j2 @@ -0,0 +1,16 @@ +# {{ ansible_managed }} + +{{ item.path }} { + {% if item.options is defined -%} + {% for option in item.options -%} + {{ option }} + {% endfor -%} + {% endif %} + {%- if item.scripts is defined -%} + {%- for name, script in item.scripts.iteritems() -%} + {{ name }} + {{ script }} + endscript + {% endfor -%} + {% endif -%} +} |