Skip to content

Commit a5be79d

Browse files
committed
refactor: moving jinja to separate dir for cleaner layout
1 parent fc04282 commit a5be79d

File tree

15 files changed

+18
-18
lines changed

15 files changed

+18
-18
lines changed

TEMPLATE/_mapdata/init.sls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
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 ~ "/libs/map.jinja" import mapdata with context %}
77
88
{%- set _mapdata = {
99
"values": mapdata,

TEMPLATE/config/clean.sls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
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 ~ "/libs/map.jinja" import mapdata as TEMPLATE with context %}
88
99
include:
1010
- {{ sls_service_clean }}

TEMPLATE/config/file.sls

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
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 ~ "/libs/map.jinja" import mapdata as TEMPLATE with context %}
8+
{%- from tplroot ~ "/libs/libtofs.jinja" import files_switch with context %}
99
1010
include:
1111
- {{ sls_package_install }}

TEMPLATE/libmapstack.jinja renamed to TEMPLATE/libs/libmapstack.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
{#- Get the `tplroot` from `tpldir` #}
55
{%- set tplroot = tpldir.split("/")[0] %}
6-
{%- from tplroot ~ "/libmatchers.jinja" import parse_matchers, query_map with context %}
6+
{%- from tplroot ~ "/libs/libmatchers.jinja" import parse_matchers, query_map with context %}
77

88
{%- set _default_config_dirs = [
99
"parameters/",

TEMPLATE/libmatchers.jinja renamed to TEMPLATE/libs/libmatchers.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
{#- Get the `tplroot` from `tpldir` #}
55
{%- set tplroot = tpldir.split("/")[0] %}
6-
{%- from tplroot ~ "/libsaltcli.jinja" import cli with context %}
6+
{%- from tplroot ~ "/libs/libsaltcli.jinja" import cli with context %}
77

88
{%- set query_map = {
99
"C": "config.get",
File renamed without changes.
File renamed without changes.

TEMPLATE/map.jinja renamed to TEMPLATE/libs/map.jinja

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
{#- Get the `tplroot` from `tpldir` #}
55
{%- set tplroot = tpldir.split("/")[0] %}
6-
{%- from tplroot ~ "/libmapstack.jinja" import mapstack with context %}
6+
{%- from tplroot ~ "/libs/libmapstack.jinja" import mapstack with context %}
77

88
{#- Where to lookup parameters source files #}
99
{%- set formula_param_dir = tplroot ~ "/parameters" %}
@@ -63,4 +63,4 @@
6363

6464
{#- Per formula post-processing of `mapdata` if it exists #}
6565
{%- do salt["log.debug"]("map.jinja: post-processing of 'mapdata'") %}
66-
{%- include tplroot ~ "/post-map.jinja" ignore missing %}
66+
{%- include tplroot ~ "/libs/post-map.jinja" ignore missing %}

TEMPLATE/package/clean.sls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
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 ~ "/libs/map.jinja" import mapdata as TEMPLATE with context %}
88
99
include:
1010
- {{ sls_config_clean }}

TEMPLATE/package/install.sls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
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 ~ "/libs/map.jinja" import mapdata as TEMPLATE with context %}
77
88
TEMPLATE-package-install-pkg-installed:
99
pkg.installed:

TEMPLATE/service/clean.sls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
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 ~ "/libs/map.jinja" import mapdata as TEMPLATE with context %}
77
88
TEMPLATE-service-clean-service-dead:
99
service.dead:

TEMPLATE/service/running.sls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
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 ~ "/libs/map.jinja" import mapdata as TEMPLATE with context %}
88
99
include:
1010
- {{ sls_config_file }}

TEMPLATE/subcomponent/config/clean.sls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
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 ~ "/libs/map.jinja" import mapdata as TEMPLATE with context %}
88
99
include:
1010
- {{ sls_service_clean }}

TEMPLATE/subcomponent/config/file.sls

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
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 %}
8-
{%- from tplroot ~ "/libtofs.jinja" import files_switch with context %}
7+
{%- from tplroot ~ "/libs/map.jinja" import mapdata as TEMPLATE with context %}
8+
{%- from tplroot ~ "/libs/libtofs.jinja" import files_switch with context %}
99
1010
include:
1111
- {{ sls_config_file }}

docs/map.jinja.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ Here is the best way to use it in an ``sls`` file:
458458
459459
{#- Get the `tplroot` from `tpldir` #}
460460
{%- set tplroot = tpldir.split("/")[0] %}
461-
{%- from tplroot ~ "/map.jinja" import mapdata as TEMPLATE with context %}
461+
{%- from tplroot ~ "/libs/map.jinja" import mapdata as TEMPLATE with context %}
462462
463463
test-does-nothing-but-display-TEMPLATE-as-json:
464464
test.nop:
@@ -480,8 +480,8 @@ Here is an example based on `template-formula/TEMPLATE/config/file.sls`_:
480480
{#- Get the `tplroot` from `tpldir` #}
481481
{%- set tplroot = tpldir.split('/')[0] %}
482482
{%- set sls_package_install = tplroot ~ '.package.install' %}
483-
{%- from tplroot ~ "/map.jinja" import mapdata as TEMPLATE with context %}
484-
{%- from tplroot ~ "/libtofs.jinja" import files_switch with context %}
483+
{%- from tplroot ~ "/libs/map.jinja" import mapdata as TEMPLATE with context %}
484+
{%- from tplroot ~ "/libs/libtofs.jinja" import files_switch with context %}
485485
486486
include:
487487
- {{ sls_package_install }}

0 commit comments

Comments
 (0)