add tplroot on every import

This commit is contained in:
Francesco Gionghi 2021-09-21 10:27:38 +02:00
parent b5b400ffa4
commit 6ab915c6b2
7 changed files with 18 additions and 10 deletions

View file

@ -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 ) %}

View file

@ -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' %}

View file

@ -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,

View file

@ -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 %}

View file

@ -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 %}

View file

@ -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 %}

View file

@ -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)