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.

32 satır
848B

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