nginx.j2 545 B

123456789101112131415161718192021222324
  1. {% if ansible_prolog -%}
  2. {% from 'templates/ansible/prolog.j2' import prolog with context %}
  3. {{ prolog() }}
  4. {% endif -%}
  5. /var/log/nginx/*.log {
  6. daily
  7. missingok
  8. rotate 1000
  9. dateext
  10. dateyesterday
  11. compress
  12. delaycompress
  13. notifempty
  14. create 0640 www-data adm
  15. sharedscripts
  16. prerotate
  17. if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
  18. run-parts /etc/logrotate.d/httpd-prerotate; \
  19. fi \
  20. endscript
  21. postrotate
  22. invoke-rc.d nginx rotate >/dev/null 2>&1
  23. endscript
  24. }