diff --git a/packages/archives.sls b/packages/archives.sls index 553ca42..11df9a4 100644 --- a/packages/archives.sls +++ b/packages/archives.sls @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # vim: ft=sls -{%- from "./map.jinja" import packages with context %} +{%- set tplroot = tpldir.split('/')[0] %} +{%- from tplroot ~ "/map.jinja" import packages with context %} {%- set wanted_archives = packages.archives.required.archives %} {%- do wanted_archives.update( packages.archives.wanted ) %} diff --git a/packages/chocolatey.sls b/packages/chocolatey.sls index a673680..e0c020c 100644 --- a/packages/chocolatey.sls +++ b/packages/chocolatey.sls @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # vim: ft=sls -{%- from "./map.jinja" import packages with context %} +{%- set tplroot = tpldir.split('/')[0] %} +{%- from tplroot ~ "/map.jinja" import packages with context %} {%- if grains['os'] == 'Windows' %} diff --git a/packages/map.jinja b/packages/map.jinja index 569389f..598ebaf 100644 --- a/packages/map.jinja +++ b/packages/map.jinja @@ -1,10 +1,11 @@ # -*- coding: utf-8 -*- # vim: ft=jinja +{%- set tplroot = tpldir.split('/')[0] %} -{%- import_yaml './defaults.yaml' as defaults %} -{%- import_yaml './osfamilymap.yaml' as osfamilymap %} -{%- import_yaml './osmap.yaml' as osmap %} -{%- import_yaml './osfingermap.yaml' as osfingermap %} +{%- import_yaml tplroot ~ '/defaults.yaml' as defaults %} +{%- import_yaml tplroot ~ '/osfamilymap.yaml' as osfamilymap %} +{%- import_yaml tplroot ~ '/osmap.yaml' as osmap %} +{%- import_yaml tplroot ~ '/osfingermap.yaml' as osfingermap %} {%- set packages = salt['grains.filter_by']( defaults, diff --git a/packages/npms.sls b/packages/npms.sls index 78d60a8..6f444e3 100644 --- a/packages/npms.sls +++ b/packages/npms.sls @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # vim: ft=sls -{%- from "./map.jinja" import packages with context %} +{%- set tplroot = tpldir.split('/')[0] %} +{%- from tplroot ~ "/map.jinja" import packages with context %} {%- set req_states = packages.npms.required.states %} {%- set req_pkgs = packages.npms.required.pkgs %} diff --git a/packages/pkgs.sls b/packages/pkgs.sls index 418606f..f6ad2c4 100644 --- a/packages/pkgs.sls +++ b/packages/pkgs.sls @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # vim: ft=sls -{%- from "./map.jinja" import packages with context %} +{%- set tplroot = tpldir.split('/')[0] %} +{%- from tplroot ~ "/map.jinja" import packages with context %} {%- set req_states = packages.pkgs.required.states %} {%- set req_packages = packages.pkgs.required.pkgs %} diff --git a/packages/remote_pkgs.sls b/packages/remote_pkgs.sls index dbbd0b0..4846678 100644 --- a/packages/remote_pkgs.sls +++ b/packages/remote_pkgs.sls @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # vim: ft=sls -{%- from "./map.jinja" import packages with context %} +{%- set tplroot = tpldir.split('/')[0] %} +{%- from tplroot ~ "/map.jinja" import packages with context %} {%- set wanted_rem_pkgs = packages.remote_pkgs %} diff --git a/packages/snaps.sls b/packages/snaps.sls index d1a61a1..eeead14 100644 --- a/packages/snaps.sls +++ b/packages/snaps.sls @@ -1,6 +1,8 @@ # -*- coding: utf-8 -*- # vim: ft=sls -{%- from "./map.jinja" import packages with context %} + +{%- set tplroot = tpldir.split('/')[0] %} +{%- from tplroot ~ "/map.jinja" import packages with context %} # As we are 'extend'ing pkg_req_pkgs and unwanted_pkgs, we need to concatenate # the attributes correctly (see #17)