Saltstack Official Nginx Formula
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

32 linhas
840B

  1. # nginx.ng.vhosts
  2. #
  3. # Manages virtual hosts and their relationship to the nginx service.
  4. {% from 'nginx/ng/map.jinja' import nginx, sls_block with context %}
  5. {% from 'nginx/ng/vhosts_config.sls' import vhost_states with context %}
  6. {% from 'nginx/ng/service.sls' import service_function with context %}
  7. {% macro file_requisites(states) %}
  8. {%- for state in states %}
  9. - file: {{ state }}
  10. {%- endfor -%}
  11. {% endmacro %}
  12. include:
  13. - nginx.ng.service
  14. - nginx.ng.vhosts_config
  15. {% if vhost_states|length() > 0 %}
  16. nginx_service_reload:
  17. service.{{ service_function }}:
  18. - name: {{ nginx.lookup.service }}
  19. - reload: True
  20. - use:
  21. - service: nginx_service
  22. - watch:
  23. {{ file_requisites(vhost_states) }}
  24. - require:
  25. {{ file_requisites(vhost_states) }}
  26. - service: nginx_service
  27. {% endif %}