2
0
salt-formula/salt/map.jinja
2019-01-25 21:35:16 +01:00

25 lines
883 B
Django/Jinja

# -*- coding: utf-8 -*-
# vim: ft=jinja
{## Start imports ##}
{% import_yaml "salt/defaults.yaml" as defaults %}
{% import_yaml "salt/osfamilymap.yaml" as osfamilymap %}
{% import_yaml "salt/osmap.yaml" as osmap %}
{% set lookup = salt['pillar.get']('salt:lookup', default={}, merge=True) %}
{% do defaults.salt.update(lookup) %}
{# merge the osfamilymap #}
{% set osfamily = salt['grains.filter_by'](osfamilymap, grain='os_family') or{} %}
{% do defaults.salt.update(osfamily) %}
{# merge the osmap #}
{% set osmap = salt['grains.filter_by'](osmap, grain='os') or{} %}
{% do defaults.salt.update(osmap) %}
{## Merge in salt pillar ##}
{% set salt_settings = salt['pillar.get']('salt', default=defaults['salt'], merge=True) %}
{## Merge in salt_formulas pillar ##}
{% set formulas_settings = salt['pillar.get']('salt_formulas',default=defaults['salt_formulas'], merge=True) %}