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.

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