From bc7f8f4970bed754f7127cb75c66bc99c6751c08 Mon Sep 17 00:00:00 2001 From: David Seira Date: Thu, 31 Aug 2017 13:19:46 +0200 Subject: [PATCH] Replace source for source_path variable name --- nginx/ng/servers_config.sls | 6 +++--- pillar.example | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nginx/ng/servers_config.sls b/nginx/ng/servers_config.sls index 0162c5d..041e1db 100644 --- a/nginx/ng/servers_config.sls +++ b/nginx/ng/servers_config.sls @@ -85,8 +85,8 @@ nginx_server_available_dir: # Managed enabled/disabled state for servers {% for server, settings in nginx.servers.managed.items() %} {% if settings.config != None %} -{% if 'source' in settings.config %} -{% set source_path = settings.config.source %} +{% if 'source_path' in settings.config %} +{% set source_path = settings.config.source_path %} {% else %} {% set source_path = 'salt://nginx/ng/files/server.conf' %} {% endif %} @@ -97,7 +97,7 @@ nginx_server_available_dir: - name: {{ server_curpath(server) }} - source: {{ source_path }} - template: jinja -{% if 'source' not in settings.config %} +{% if 'source_path' not in settings.config %} - context: config: {{ settings.config|json() }} {% endif %} diff --git a/pillar.example b/pillar.example index cc6708a..3debc2a 100644 --- a/pillar.example +++ b/pillar.example @@ -77,7 +77,7 @@ nginx: # nginx.conf (main server) declarations # dictionaries map to blocks {} and lists cause the same declaration to repeat with different values config: - source: salt://path_to_nginx_conf_file/nginx.conf # IMPORTANT: This option is mutually exclusive with the rest of the + source_path: salt://path_to_nginx_conf_file/nginx.conf # IMPORTANT: This option is mutually exclusive with the rest of the # options; if it is found other options (worker_processes: 4 and so # on) are not processed and just upload the file from source worker_processes: 4 @@ -141,12 +141,12 @@ nginx: # test something else; # } # } - mysite2: # Using source options to upload the file instead of templating all the file + mysite2: # Using source_path options to upload the file instead of templating all the file enabled: True available_dir: /etc/nginx/sites-available enabled_dir: /etc/nginx/sites-enabled config: - source: salt://path-to-site-file/mysite2 + source_path: salt://path-to-site-file/mysite2 certificates_path: '/etc/nginx/ssl' # Use this if you need to deploy below certificates in a custom path. # If you're doing SSL termination, you can deploy certificates this way.