ansible-role-nginx/templates/logrotate/nginx.j2
2020-09-15 21:27:06 +02:00

18 lines
378 B
Django/Jinja

{% for path in nginx_logrotate_conf.paths %}
{{ path }}
{% endfor %}
{
{% for option in nginx_logrotate_conf.options %}
{{ option }}
{% endfor %}
postrotate
{% if ansible_facts['os_family'] == "Debian" %}
if [ -f /var/run/nginx.pid ]; then
kill -USR1 `cat /var/run/nginx.pid`
fi
{% else %}
nginx -s reopen
{% endif %}
endscript
}