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.

servers.sls 848B

12345678910111213141516171819202122232425262728293031
  1. # nginx.ng.servers
  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/servers_config.sls' import server_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.servers_config
  15. {% if server_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. - listen:
  23. {{ file_requisites(server_states) }}
  24. - require:
  25. {{ file_requisites(server_states) }}
  26. - service: nginx_service
  27. {% endif %}