Skip to content

Commit 79dd80f

Browse files
committed
temp fix until saltstack-formulas#275 is fixed/merged upstream
1 parent 49fb7ea commit 79dd80f

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

nginx/servers_config.sls

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
{% set server_states = [] %}
1111
{#- _nginx is a lightened copy of nginx map intended to passed in templates #}
1212
{%- set _nginx = nginx.copy() %}
13-
{%- do _nginx.pop('snippets') %}
14-
{%- do _nginx.pop('servers') %}
13+
{%- do _nginx.pop('snippets') if nginx.snippets is defined %}
14+
{%- do _nginx.pop('servers') if nginx.servers is defined%}
1515
1616
# Simple path concatenation.
1717
# Needs work to make this function on windows.

nginx/snippets.sls

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
99
{#- _nginx is a lightened copy of nginx map intended to passed in templates #}
1010
{%- set _nginx = nginx.copy() %}
11-
{%- do _nginx.pop('snippets') %}
12-
{%- do _nginx.pop('servers') %}
11+
{%- do _nginx.pop('snippets') if nginx.snippets is defined %}
12+
{%- do _nginx.pop('servers') if nginx.servers is defined %}
1313
1414
nginx_snippets_dir:
1515
file.directory:

test/salt/passenger/pillar/nginx.sls

-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# vim: ft=yaml
33
---
44
# Simple pillar setup
5-
# - snippet letsencrypt
65
# - remove 'default' site
76
# - create 'mysite' site
87

@@ -21,10 +20,6 @@ nginx:
2120
lookup:
2221
passenger_package: {{ passenger_pkg }}
2322

24-
snippets:
25-
letsencrypt.conf:
26-
- location ^~ /.well-known/acme-challenge/:
27-
- proxy_pass: http://localhost:9999
2823
server:
2924
config:
3025
# This is required to get the passenger module loaded
@@ -63,4 +58,3 @@ nginx:
6358
- index: 'index.html index.htm'
6459
- location ~ .htm:
6560
- try_files: '$uri $uri/ =404'
66-
- include: '/etc/nginx/snippets/letsencrypt.conf'

0 commit comments

Comments
 (0)