ansible-role-nginx/templates/logrotate/nginx.j2
2020-05-19 22:51:08 +02:00

21 lines
474 B
Django/Jinja

{% for path in nginx_logrotate_conf.paths %}
{{ path }}
{% endfor %}
{
{% for option in nginx_logrotate_conf.options %}
{{ option }}
{% endfor %}
prerotate
if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
run-parts /etc/logrotate.d/httpd-prerotate; \
fi \
endscript
postrotate
{% if ansible_os_family == "Debian" %}
invoke-rc.d nginx rotate >/dev/null 2>&1
{% else %}
nginx -s reopen
{% endif %}
endscript
}