summaryrefslogtreecommitdiffstats
path: root/roles/nickhammond.logrotate/templates/logrotate.d.j2
diff options
context:
space:
mode:
Diffstat (limited to 'roles/nickhammond.logrotate/templates/logrotate.d.j2')
-rw-r--r--roles/nickhammond.logrotate/templates/logrotate.d.j216
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 -%}
+}