Replace source for source_path variable name in nginx.conf file

This commit is contained in:
David Seira 2017-08-31 13:22:55 +02:00 committed by David Seira
parent bc7f8f4970
commit 8c0259c593

View File

@ -12,7 +12,7 @@ nginx_log_dir:
- group: {{ nginx.server.config.user }}
{% endif %}
{% if 'source' in nginx.server.config %}
{% if 'source_path' in nginx.server.config %}
{% set source_path = nginx.server.config.source %}
{% else %}
{% set source_path = 'salt://nginx/ng/files/nginx.conf' %}
@ -23,7 +23,7 @@ nginx_config:
- name: {{ nginx.lookup.conf_file }}
- source: {{ source_path }}
- template: jinja
{% if 'source' not in nginx.server.config %}
{% if 'source_path' not in nginx.server.config %}
- context:
config: {{ nginx.server.config|json() }}
{% endif %}