File tree 2 files changed +11
-0
lines changed 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 8
8
{%- from tplroot ~ ' /libtofs.jinja' import files_switch with context % }
9
9
10
10
{% set server_states = [] % }
11
+ {# - _nginx is a lightened copy of nginx map intended to passed in templates #}
12
+ {%- set _nginx = nginx.copy() % }
13
+ {%- do _nginx.pop(' snippets' ) % }
14
+ {%- do _nginx.pop(' servers' ) % }
11
15
12
16
# Simple path concatenation.
13
17
# Needs work to make this function on windows.
@@ -126,6 +130,7 @@ nginx_server_available_dir:
126
130
{% if ' source_path' not in settings.config % }
127
131
- context:
128
132
config: {{ settings.config| json(sort_keys = False ) }}
133
+ nginx: {{ _nginx| json() }}
129
134
{% endif % }
130
135
{% if ' overwrite' in settings and settings.overwrite == False % }
131
136
- unless:
Original file line number Diff line number Diff line change 6
6
{%- from tplroot ~ ' /map.jinja' import nginx, sls_block with context % }
7
7
{%- from tplroot ~ ' /libtofs.jinja' import files_switch with context % }
8
8
9
+ {# - _nginx is a lightened copy of nginx map intended to passed in templates #}
10
+ {%- set _nginx = nginx.copy() % }
11
+ {%- do _nginx.pop(' snippets' ) % }
12
+ {%- do _nginx.pop(' servers' ) % }
13
+
9
14
nginx_snippets_dir:
10
15
file .directory:
11
16
{{ sls_block(nginx.servers.dir_opts) }}
@@ -22,4 +27,5 @@ nginx_snippet_{{ snippet }}:
22
27
- template: jinja
23
28
- context:
24
29
config: {{ config| json() }}
30
+ nginx: {{ _nginx| json() }}
25
31
{% endfor % }
You can’t perform that action at this time.
0 commit comments