82d5bd7d16
Role will now test if a log exist (and hence the application exists on the host before writing a logrotate config to the server.
36 lines
704 B
Django/Jinja
36 lines
704 B
Django/Jinja
{{ ansible_managed | comment }}
|
|
|
|
{{ item.logs | join(" ") }} {
|
|
{% for option in item.options %}
|
|
{{ option }}
|
|
{% endfor %}
|
|
{% if item.postrotate|default([]) %}
|
|
postrotate
|
|
{% for line in item.postrotate %}
|
|
{{ line }}
|
|
{% endfor %}
|
|
endscript
|
|
{% endif %}
|
|
{% if item.preremove|default([]) %}
|
|
preremove
|
|
{% for line in item.preremove %}
|
|
{{ line }}
|
|
{% endfor %}
|
|
endscript
|
|
{% endif %}
|
|
{% if item.lastaction|default([]) %}
|
|
lastaction
|
|
{% for line in item.lastaction %}
|
|
{{ line }}
|
|
{% endfor %}
|
|
endscript
|
|
{% endif %}
|
|
{% if item.firstaction|default([]) %}
|
|
firstaction
|
|
{% for line in item.firstaction %}
|
|
{{ line }}
|
|
{% endfor %}
|
|
endscript
|
|
{% endif %}
|
|
}
|