nginx.j2 535 B

12345678910111213141516171819202122232425
  1. {% if ansible_controlled is defined and ansible_controlled != "" %}
  2. #
  3. # {{ ansible_controlled }}
  4. #
  5. {% endif %}
  6. /var/log/nginx/*.log {
  7. daily
  8. missingok
  9. rotate 1000
  10. dateext
  11. dateyesterday
  12. compress
  13. delaycompress
  14. notifempty
  15. create 0640 www-data adm
  16. sharedscripts
  17. prerotate
  18. if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
  19. run-parts /etc/logrotate.d/httpd-prerotate; \
  20. fi \
  21. endscript
  22. postrotate
  23. invoke-rc.d nginx rotate >/dev/null 2>&1
  24. endscript
  25. }