Saltstack Official Nginx Formula
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

1234567891011121314151617181920212223242526272829303132
  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 -%}