diff --git a/nginx/servers_config.sls b/nginx/servers_config.sls index 5dd11a9e..dc7abe13 100644 --- a/nginx/servers_config.sls +++ b/nginx/servers_config.sls @@ -10,8 +10,8 @@ {% set server_states = [] %} {#- _nginx is a lightened copy of nginx map intended to passed in templates #} {%- set _nginx = nginx.copy() %} -{%- do _nginx.pop('snippets') %} -{%- do _nginx.pop('servers') %} +{%- do _nginx.pop('snippets') if nginx.snippets is defined %} +{%- do _nginx.pop('servers') if nginx.servers is defined%} # Simple path concatenation. # Needs work to make this function on windows. diff --git a/nginx/snippets.sls b/nginx/snippets.sls index d09ba366..f19905ba 100644 --- a/nginx/snippets.sls +++ b/nginx/snippets.sls @@ -8,8 +8,8 @@ {#- _nginx is a lightened copy of nginx map intended to passed in templates #} {%- set _nginx = nginx.copy() %} -{%- do _nginx.pop('snippets') %} -{%- do _nginx.pop('servers') %} +{%- do _nginx.pop('snippets') if nginx.snippets is defined %} +{%- do _nginx.pop('servers') if nginx.servers is defined %} nginx_snippets_dir: file.directory: diff --git a/test/salt/passenger/pillar/nginx.sls b/test/salt/passenger/pillar/nginx.sls index 63a9f544..c8d90d48 100644 --- a/test/salt/passenger/pillar/nginx.sls +++ b/test/salt/passenger/pillar/nginx.sls @@ -2,7 +2,6 @@ # vim: ft=yaml --- # Simple pillar setup -# - snippet letsencrypt # - remove 'default' site # - create 'mysite' site @@ -21,10 +20,6 @@ nginx: lookup: passenger_package: {{ passenger_pkg }} - snippets: - letsencrypt.conf: - - location ^~ /.well-known/acme-challenge/: - - proxy_pass: http://localhost:9999 server: config: # This is required to get the passenger module loaded @@ -63,4 +58,3 @@ nginx: - index: 'index.html index.htm' - location ~ .htm: - try_files: '$uri $uri/ =404' - - include: '/etc/nginx/snippets/letsencrypt.conf'