File tree Expand file tree Collapse file tree 12 files changed +46
-19
lines changed Expand file tree Collapse file tree 12 files changed +46
-19
lines changed Original file line number Diff line number Diff line change 33---
44{# - Get the `tplroot` from `tpldir` #}
55{%- set tplroot = tpldir.split(" /" )[0 ] %}
6- {%- from tplroot ~ " /map.jinja" import mapdata with context % }
6+ {%- from tplroot ~ " /map.jinja" import mapdata without context % }
77
88{%- set _mapdata = {
99 " values" : mapdata,
Original file line number Diff line number Diff line change 44{# - Get the `tplroot` from `tpldir` #}
55{%- set tplroot = tpldir.split(' /' )[0 ] %}
66{%- set sls_service_clean = tplroot ~ ' .service.clean' %}
7- {%- from tplroot ~ " /map.jinja" import mapdata as TEMPLATE with context % }
7+ {%- from tplroot ~ " /map.jinja" import mapdata as TEMPLATE without context % }
88
99include:
1010 - {{ sls_service_clean }}
Original file line number Diff line number Diff line change 44{# - Get the `tplroot` from `tpldir` #}
55{%- set tplroot = tpldir.split(' /' )[0 ] %}
66{%- set sls_package_install = tplroot ~ ' .package.install' %}
7- {%- from tplroot ~ " /map.jinja" import mapdata as TEMPLATE with context % }
8- {%- from tplroot ~ " /libtofs.jinja" import files_switch with context % }
7+ {%- from tplroot ~ " /map.jinja" import mapdata as TEMPLATE without context % }
8+ {%- from tplroot ~ " /libtofs.jinja" import files_switch without context % }
99
1010include:
1111 - {{ sls_package_install }}
Original file line number Diff line number Diff line change 11{#- -*- coding: utf-8 -*- #}
22{#- vim: ft=jinja #}
33
4- {#- Get the `tplroot` from `tpldir` #}
5- {% - set tplroot = tpldir .split ("/" )[0] %}
4+ {% - if not tplfile .endswith ("/libmapstack.jinja" ) %}
5+ {#- Force import `without context` #}
6+ {#- `with context` override the `tplfile` and `tpldir` variables #}
7+ {{- raise("Import error: libmapstack.jinja must be imported without context. tplfile='" ~ tplfile ~ "'") }}
8+ {% - elif tplfile .startswith ("../" ) %}
9+ {#- Force import with absolute path #}
10+ {{- raise("Import error: libmapstack.jinja must be imported with absolute path. tplfile='" ~ tplfile ~ "'") }}
11+ {% - endif %}
12+
13+ {#- `tplroot` is the directory of the current imported file #}
14+ {% - set tplroot = tpldir %}
615{% - from tplroot ~ "/libmatchers.jinja" import parse_matchers , query_map %}
716
817{% - set _default_config_dirs = [
Original file line number Diff line number Diff line change 11{#- -*- coding: utf-8 -*- #}
22{#- vim: ft=jinja #}
33
4+ {% - if not tplfile .endswith ("/libmatchers.jinja" ) %}
5+ {#- Force import `without context` #}
6+ {#- `with context` override the `tplfile` and `tpldir` variables #}
7+ {{- raise("Import error: libmatchers.jinja must be imported without context. tplfile='" ~ tplfile ~ "'") }}
8+ {% - elif tplfile .startswith ("../" ) %}
9+ {#- Force import with absolute path #}
10+ {{- raise("Import error: libmatchers.jinja must be imported with absolute path. tplfile='" ~ tplfile ~ "'") }}
11+ {% - endif %}
12+
413{#- Get the `tplroot` from `tpldir` #}
5- {% - set tplroot = tpldir . split ( "/" )[0] %}
14+ {% - set tplroot = tpldir %}
615{% - from tplroot ~ "/libsaltcli.jinja" import cli %}
716
817{% - set query_map = {
Original file line number Diff line number Diff line change 1- # -*- coding: utf-8 -*-
2- # vim: ft=jinja
1+ {#- -*- coding: utf-8 -*- #}
2+ {#- vim: ft=jinja #}
33
4- {#- Get the `tplroot` from `tpldir` #}
5- {% - set tplroot = tpldir .split ("/" )[0] %}
6- {% - from tplroot ~ "/libmapstack.jinja" import mapstack %}
4+ {% - if not tplfile .endswith ("/map.jinja" ) %}
5+ {#- Force import `without context` #}
6+ {#- `with context` override the `tplfile` and `tpldir` variables #}
7+ {{- raise("Import error: map.jinja must be imported without context. tplfile='" ~ tplfile ~ "'") }}
8+ {% - elif tplfile .startswith ("../" ) %}
9+ {#- Force import with absolute path #}
10+ {{- raise("Import error: map.jinja must be imported with absolute path. tplfile='" ~ tplfile ~ "'") }}
11+ {% - endif %}
12+
13+ {#- `tplroot` is the directory of the current imported file #}
14+ {% - set tplroot = tpldir %}
15+ {% - from tplroot ~ "/libmapstack.jinja" import mapstack without context %}
716
817{#- Where to lookup parameters source files #}
918{% - set formula_param_dir = tplroot ~ "/parameters" %}
Original file line number Diff line number Diff line change 44{# - Get the `tplroot` from `tpldir` #}
55{%- set tplroot = tpldir.split(' /' )[0 ] %}
66{%- set sls_config_clean = tplroot ~ ' .config.clean' %}
7- {%- from tplroot ~ " /map.jinja" import mapdata as TEMPLATE with context % }
7+ {%- from tplroot ~ " /map.jinja" import mapdata as TEMPLATE without context % }
88
99include:
1010 - {{ sls_config_clean }}
Original file line number Diff line number Diff line change 33
44{# - Get the `tplroot` from `tpldir` #}
55{%- set tplroot = tpldir.split(' /' )[0 ] %}
6- {%- from tplroot ~ " /map.jinja" import mapdata as TEMPLATE with context % }
6+ {%- from tplroot ~ " /map.jinja" import mapdata as TEMPLATE without context % }
77
88TEMPLATE - package- install- pkg- installed:
99 pkg.installed:
Original file line number Diff line number Diff line change 33
44{# - Get the `tplroot` from `tpldir` #}
55{%- set tplroot = tpldir.split(' /' )[0 ] %}
6- {%- from tplroot ~ " /map.jinja" import mapdata as TEMPLATE with context % }
6+ {%- from tplroot ~ " /map.jinja" import mapdata as TEMPLATE without context % }
77
88TEMPLATE - service- clean- service- dead:
99 service.dead:
Original file line number Diff line number Diff line change 44{# - Get the `tplroot` from `tpldir` #}
55{%- set tplroot = tpldir.split(' /' )[0 ] %}
66{%- set sls_config_file = tplroot ~ ' .config.file' %}
7- {%- from tplroot ~ " /map.jinja" import mapdata as TEMPLATE with context % }
7+ {%- from tplroot ~ " /map.jinja" import mapdata as TEMPLATE without context % }
88
99include:
1010 - {{ sls_config_file }}
You can’t perform that action at this time.
0 commit comments