Import github.com/arillso/ansible.logrotate

at version 1.5.2 (commit 038649f
This commit is contained in:
Serge van Ginderachter 2020-09-09 16:17:43 +02:00
parent 008fdbaa1f
commit b0e5245e4e
No known key found for this signature in database
GPG key ID: 3148E9B9232D65E5
9 changed files with 248 additions and 0 deletions

View file

@ -0,0 +1,30 @@
{{ ansible_managed | comment }}
# see "man logrotate" for details
{% if logrotate_options | length > 0 %}
{% for option in logrotate_options %}
{{ option }}
{% endfor %}
{% else %}
{% for option in logrotate_distribution_options | default([]) %}
{{ option }}
{% endfor %}
{% endif %}
# packages drop log rotation information into this directory
include {{ logrotate_include_dir }}
# no packages own wtmp, or btmp -- we'll rotate them here
{{ logrotate_wtmp.logs | join(" ") }} {
{% for option in logrotate_wtmp.options %}
{{ option }}
{% endfor %}
}
{{ logrotate_btmp.logs | join(" ") }} {
{% for option in logrotate_btmp.options %}
{{ option }}
{% endfor %}
}
# system-specific logs may be configured here

View file

@ -0,0 +1,37 @@
{{ ansible_managed | comment }}
{% for definition in item.definitions %}
{{ definition.logs | join(" ") }} {
{% for option in definition.options %}
{{ option }}
{% endfor %}
{% if definition.postrotate|default([]) %}
postrotate
{% for line in definition.postrotate %}
{{ line }}
{% endfor %}
endscript
{% endif %}
{% if definition.preremove|default([]) %}
preremove
{% for line in definition.preremove %}
{{ line }}
{% endfor %}
endscript
{% endif %}
{% if definition.lastaction|default([]) %}
lastaction
{% for line in definition.lastaction %}
{{ line }}
{% endfor %}
endscript
{% endif %}
{% if definition.firstaction|default([]) %}
firstaction
{% for line in definition.firstaction %}
{{ line }}
{% endfor %}
endscript
{% endif %}
}
{% endfor %}