Saltstack Official Nginx Formula
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

31 líneas
744B

  1. # nginx.servers
  2. #
  3. # Manages virtual hosts and their relationship to the nginx service.
  4. {%- set tplroot = tpldir.split('/')[0] %}
  5. {%- from tplroot ~ '/map.jinja' import nginx, sls_block with context %}
  6. {%- from tplroot ~ '/servers_config.sls' import server_states with context %}
  7. {% macro file_requisites(states) %}
  8. {%- for state in states %}
  9. - file: {{ state }}
  10. {%- endfor -%}
  11. {% endmacro %}
  12. include:
  13. - nginx.service
  14. - nginx.servers_config
  15. {% if server_states|length() > 0 %}
  16. extend:
  17. nginx_service:
  18. service:
  19. - reload: True
  20. - require:
  21. - file: nginx_config
  22. {{ file_requisites(server_states) }}
  23. - listen:
  24. - file: nginx_config
  25. {{ file_requisites(server_states) }}
  26. {% endif %}