diff --git a/template/pkg/clean.sls b/template/pkg/clean.sls index 1f7b8f12..daf3dfb9 100644 --- a/template/pkg/clean.sls +++ b/template/pkg/clean.sls @@ -1,7 +1,9 @@ # -*- coding: utf-8 -*- # vim: ft=sls -{%- from salt['file.dirname'](tpldir) ~ "/map.jinja" import template with context %} +{#- Get the `topdir` from `tpldir` #} +{%- set topdir = tpldir.split('/')[0] %} +{%- from topdir ~ "/map.jinja" import template with context %} template-service-dead: service.dead: diff --git a/template/pkg/config.sls b/template/pkg/config.sls index ddc67484..b921ba18 100644 --- a/template/pkg/config.sls +++ b/template/pkg/config.sls @@ -1,9 +1,10 @@ # -*- coding: utf-8 -*- # vim: ft=sls +{#- Get the `topdir` from `tpldir` #} {%- set topdir = tpldir.split('/')[0] %} -{%- from salt['file.dirname'](tpldir) ~ "/map.jinja" import template with context %} -{%- from salt['file.dirname'](tpldir) ~ "/macros.jinja" import files_switch with context %} +{%- from topdir ~ "/map.jinja" import template with context %} +{%- from topdir ~ "/macros.jinja" import files_switch with context %} include: - .install diff --git a/template/pkg/install.sls b/template/pkg/install.sls index a2e4eb72..d71cbec9 100644 --- a/template/pkg/install.sls +++ b/template/pkg/install.sls @@ -1,7 +1,9 @@ # -*- coding: utf-8 -*- # vim: ft=sls -{%- from salt['file.dirname'](tpldir) ~ "/map.jinja" import template with context %} +{#- Get the `topdir` from `tpldir` #} +{%- set topdir = tpldir.split('/')[0] %} +{%- from topdir ~ "/map.jinja" import template with context %} template-pkg: pkg.installed: diff --git a/template/pkg/service.sls b/template/pkg/service.sls index 2449736a..b2c4dbc5 100644 --- a/template/pkg/service.sls +++ b/template/pkg/service.sls @@ -1,7 +1,9 @@ # -*- coding: utf-8 -*- # vim: ft=sls -{%- from salt['file.dirname'](tpldir) ~ "/map.jinja" import template with context %} +{#- Get the `topdir` from `tpldir` #} +{%- set topdir = tpldir.split('/')[0] %} +{%- from topdir ~ "/map.jinja" import template with context %} include: - .config