ansible-role-nginx/templates/logrotate/nginx.j2

18 lines
378 B
Plaintext
Raw Permalink Normal View History

2020-05-19 22:51:08 +02:00
{% for path in nginx_logrotate_conf.paths %}
{{ path }}
{% endfor %}
{
{% for option in nginx_logrotate_conf.options %}
{{ option }}
{% endfor %}
postrotate
2020-09-15 21:27:06 +02:00
{% if ansible_facts['os_family'] == "Debian" %}
if [ -f /var/run/nginx.pid ]; then
kill -USR1 `cat /var/run/nginx.pid`
fi
2020-05-19 22:51:08 +02:00
{% else %}
nginx -s reopen
{% endif %}
endscript
}