File tree 5 files changed +22
-6
lines changed
test/salt/passenger/pillar 5 files changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,3 @@ nginx_config:
31
31
- context:
32
32
config: {{ nginx.server.config| json(sort_keys = False ) }}
33
33
{% endif % }
34
- {% if nginx.check_config_before_apply % }
35
- - check_cmd: / usr/ sbin/ nginx - t - c
36
- {% endif % }
Original file line number Diff line number Diff line change @@ -123,6 +123,12 @@ nginx_server_available_dir:
123
123
}}
124
124
- makedirs: True
125
125
- template: jinja
126
+ {%- if ' requires' in settings % }
127
+ - require:
128
+ {%- for k, v in settings.requires.items() % }
129
+ - {{ k }}: {{ v }}
130
+ {%- endfor % }
131
+ {%- endif % }
126
132
{% if ' source_path' not in settings.config % }
127
133
- context:
128
134
config: {{ settings.config| json(sort_keys = False ) }}
Original file line number Diff line number Diff line change @@ -42,3 +42,6 @@ nginx_service:
42
42
{% else % }
43
43
- pkg: nginx_install
44
44
{% endif % }
45
+ {% if nginx.check_config_before_apply % }
46
+ - only_if: / usr/ sbin/ nginx - t
47
+ {% endif % }
Original file line number Diff line number Diff line change @@ -202,6 +202,18 @@ nginx:
202
202
# and None indicates no action
203
203
enabled : true
204
204
205
+ # This let's you add dependencies on other resources being applied for a
206
+ # particular vhost
207
+ # A common case is when you use this formula together with letsencrypt's,
208
+ # validating through nginx: you need nginx running (to validate the vhost) but
209
+ # can't have the ssl vhost up until the certificate is created (because it
210
+ # won't exist and will make nginx fail to load the configuration)
211
+ #
212
+ # An example, when using LE to create the cert for 'some.host.domain':
213
+ # requires:
214
+ # cmd: create-initial-cert-some.host.domain
215
+ requires : {}
216
+
205
217
# Remove the site config file shipped by nginx
206
218
# (i.e. '/etc/nginx/sites-available/default' by default)
207
219
# It also remove the symlink (if it is exists).
Original file line number Diff line number Diff line change 26
26
- location ^~ /.well-known/acme-challenge/ :
27
27
- proxy_pass : http://localhost:9999
28
28
server :
29
-
30
29
config :
31
30
# This is required to get the passenger module loaded
32
31
# In Debian it can be done with this
64
63
- index : ' index.html index.htm'
65
64
- location ~ .htm :
66
65
- try_files : ' $uri $uri/ =404'
67
- # - include: '/etc/nginx/snippets/letsencrypt.conf'
68
- - include : ' snippets/letsencrypt.conf'
66
+ - include : ' /etc/nginx/snippets/letsencrypt.conf'
You can’t perform that action at this time.
0 commit comments