Saltstack Official Nginx Formula
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

25 lines
663B

  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. include:
  8. - nginx.ng.service
  9. - nginx.ng.vhosts_config
  10. {% if vhost_states|length() > 0 %}
  11. nginx_service_reload:
  12. service.{{ service_function }}:
  13. - name: {{ nginx.lookup.service }}
  14. - reload: True
  15. - use:
  16. - service: nginx_service
  17. - watch:
  18. {%- for vhost in vhost_states %}
  19. - file: {{ vhost }}
  20. {% endfor -%}
  21. {% endif %}