File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 88{%- from tplroot ~ ' /libtofs.jinja' import files_switch with context % }
99
1010{% 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' ) % }
1115
1216# Simple path concatenation.
1317# Needs work to make this function on windows.
@@ -126,6 +130,7 @@ nginx_server_available_dir:
126130{% if ' source_path' not in settings.config % }
127131 - context:
128132 config: {{ settings.config| json(sort_keys = False ) }}
133+ nginx: {{ _nginx| json() }}
129134{% endif % }
130135 {% if ' overwrite' in settings and settings.overwrite == False % }
131136 - unless:
Original file line number Diff line number Diff line change 66{%- from tplroot ~ ' /map.jinja' import nginx, sls_block with context % }
77{%- from tplroot ~ ' /libtofs.jinja' import files_switch with context % }
88
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+
914nginx_snippets_dir:
1015 file .directory:
1116 {{ sls_block(nginx.servers.dir_opts) }}
@@ -22,4 +27,5 @@ nginx_snippet_{{ snippet }}:
2227 - template: jinja
2328 - context:
2429 config: {{ config| json() }}
30+ nginx: {{ _nginx| json() }}
2531{% endfor % }
You can’t perform that action at this time.
0 commit comments