File tree Expand file tree Collapse file tree 5 files changed +22
-6
lines changed
test/salt/passenger/pillar Expand file tree Collapse file tree 5 files changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,3 @@ nginx_config:
3131 - context:
3232 config: {{ nginx.server.config| json(sort_keys = False ) }}
3333{% 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:
123123 }}
124124 - makedirs: True
125125 - template: jinja
126+ {%- if ' requires' in settings % }
127+ - require:
128+ {%- for k, v in settings.requires.items() % }
129+ - {{ k }}: {{ v }}
130+ {%- endfor % }
131+ {%- endif % }
126132{% if ' source_path' not in settings.config % }
127133 - context:
128134 config: {{ settings.config| json(sort_keys = False ) }}
Original file line number Diff line number Diff line change @@ -42,3 +42,6 @@ nginx_service:
4242 {% else % }
4343 - pkg: nginx_install
4444 {% 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:
202202 # and None indicates no action
203203 enabled : true
204204
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+
205217 # Remove the site config file shipped by nginx
206218 # (i.e. '/etc/nginx/sites-available/default' by default)
207219 # It also remove the symlink (if it is exists).
Original file line number Diff line number Diff line change 2626 - location ^~ /.well-known/acme-challenge/ :
2727 - proxy_pass : http://localhost:9999
2828 server :
29-
3029 config :
3130 # This is required to get the passenger module loaded
3231 # In Debian it can be done with this
6463 - index : ' index.html index.htm'
6564 - location ~ .htm :
6665 - 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