xoxys.logrotate/templates/etc/logrotate.d/config.j2

41 lines
906 B
Plaintext
Raw Normal View History

2020-01-28 22:39:05 +01:00
#jinja2: lstrip_blocks: True
{{ ansible_managed | comment }}
{% for definition in item.definitions %}
{% for log in definition.logs %}
{{ log }}{{ " {" if loop.last else "" }}
{% endfor %}
{% for option in definition.options %}
{{ option }}
{% endfor %}
2021-05-25 23:32:55 +02:00
{% if definition.postrotate | default([]) %}
2020-01-28 22:39:05 +01:00
postrotate
{% for line in definition.postrotate %}
{{ line }}
{% endfor %}
endscript
{% endif %}
2021-05-25 23:32:55 +02:00
{% if definition.preremove | default([]) %}
2020-01-28 22:39:05 +01:00
preremove
{% for line in definition.preremove %}
{{ line }}
{% endfor %}
endscript
{% endif %}
2021-05-25 23:32:55 +02:00
{% if definition.lastaction | default([]) %}
2020-01-28 22:39:05 +01:00
lastaction
{% for line in definition.lastaction %}
{{ line }}
{% endfor %}
endscript
{% endif %}
2021-05-25 23:32:55 +02:00
{% if definition.firstaction | default([]) %}
2020-01-28 22:39:05 +01:00
firstaction
{% for line in definition.firstaction %}
{{ line }}
{% endfor %}
endscript
{% endif %}
}
{% endfor %}