Saltstack Official Nginx Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 satır
606B

  1. {% set logger_types = ('access', 'error') %}
  2. {% for log_type in logger_types %}
  3. /var/log/nginx/{{ log_type }}.log:
  4. file.absent
  5. nginx-logger-{{ log_type }}:
  6. file:
  7. - managed
  8. - name: /etc/init/nginx-logger-{{ log_type }}.conf
  9. - template: jinja
  10. - user: root
  11. - group: root
  12. - mode: 440
  13. - source: salt://nginx/templates/upstart-logger.jinja
  14. - context:
  15. type: {{ log_type }}
  16. service:
  17. - running
  18. - enable: True
  19. - require:
  20. - file: nginx-logger-{{ log_type }}
  21. - require_in:
  22. - service: nginx
  23. {% endfor %}
  24. /etc/logrotate.d/nginx:
  25. file.absent