Browse Source

Merge pull request #19 from spsoit/master

Tightened up some ng requisites.
tags/v0.55.0
Seth House 10 years ago
parent
commit
8026013ae1
2 changed files with 12 additions and 3 deletions
  1. +2
    -0
      nginx/ng/init.sls
  2. +10
    -3
      nginx/ng/vhosts.sls

+ 2
- 0
nginx/ng/init.sls View File

service: service:
- watch: - watch:
- file: nginx_config - file: nginx_config
- require:
- file: nginx_config

+ 10
- 3
nginx/ng/vhosts.sls View File

{% from 'nginx/ng/vhosts_config.sls' import vhost_states with context %} {% from 'nginx/ng/vhosts_config.sls' import vhost_states with context %}
{% from 'nginx/ng/service.sls' import service_function with context %} {% from 'nginx/ng/service.sls' import service_function with context %}


{% macro file_requisites(states) %}
{%- for state in states %}
- file: {{ state }}
{%- endfor -%}
{% endmacro %}

include: include:
- nginx.ng.service - nginx.ng.service
- nginx.ng.vhosts_config - nginx.ng.vhosts_config
- use: - use:
- service: nginx_service - service: nginx_service
- watch: - watch:
{%- for vhost in vhost_states %}
- file: {{ vhost }}
{% endfor -%}
{{ file_requisites(vhost_states) }}
- require:
{{ file_requisites(vhost_states) }}
- service: nginx_service
{% endif %} {% endif %}

Loading…
Cancel
Save