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.

33 lines
596B

  1. /usr/share/nginx:
  2. file:
  3. - directory
  4. {% for filename in ('default', 'example_ssl') %}
  5. /etc/nginx/conf.d/{{ filename }}.conf:
  6. file.absent
  7. {% endfor %}
  8. /etc/nginx:
  9. file.directory:
  10. - user: root
  11. - group: root
  12. /etc/nginx/nginx.conf:
  13. file:
  14. - managed
  15. - template: jinja
  16. - user: root
  17. - group: root
  18. - mode: 440
  19. - source: salt://nginx/templates/config.jinja
  20. - require:
  21. - file: /etc/nginx
  22. - pkg: nginx
  23. {% for dir in ('sites-enabled', 'sites-available') %}
  24. /etc/nginx/{{ dir }}:
  25. file.directory:
  26. - user: root
  27. - group: root
  28. {% endfor -%}