From 7e56f6915ea435fde7de2c5ab1664524c6207517 Mon Sep 17 00:00:00 2001 From: Lucian Corduneanu Date: Thu, 12 Aug 2021 14:44:47 +0300 Subject: [PATCH] Import YAML with context (#56) * fix(yaml): Import YAML with context * fix(sls): Add missing endif --- node/config/clean.sls | 2 ++ node/map.jinja | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/node/config/clean.sls b/node/config/clean.sls index 148d859..e816d14 100644 --- a/node/config/clean.sls +++ b/node/config/clean.sls @@ -24,3 +24,5 @@ node-config-clean-file-absent: - {{ node.environ_file }} - require: - sls: {{ sls_package_clean }} + +{%- endif %} diff --git a/node/map.jinja b/node/map.jinja index 7e35a0f..df03690 100644 --- a/node/map.jinja +++ b/node/map.jinja @@ -2,10 +2,10 @@ # vim: ft=jinja {%- set tplroot = tpldir.split('/')[0] %} -{%- import_yaml tplroot ~ "/defaults.yaml" as default_settings %} -{%- import_yaml tplroot ~ "/osfamilymap.yaml" as osfamilymap %} -{%- import_yaml tplroot ~ "/osmap.yaml" as osmap %} -{%- import_yaml tplroot ~ "/osarchmap.yaml" as osarchmap %} +{%- import_yaml tplroot ~ "/defaults.yaml" as default_settings with context %} +{%- import_yaml tplroot ~ "/osfamilymap.yaml" as osfamilymap with context %} +{%- import_yaml tplroot ~ "/osmap.yaml" as osmap with context %} +{%- import_yaml tplroot ~ "/osarchmap.yaml" as osarchmap with context %} {%- set _config = salt['config.get'](tplroot, default={}) %} {%- set defaults = salt['grains.filter_by'](