0
0
mirror of https://github.com/saltstack-formulas/salt-formula.git synced 2024-11-30 23:55:23 +01:00
salt-formula/salt/map.jinja
Imran Iqbal 5b348eb354
fix(map.jinja): fix salt-lint errors
```bash
Examining salt/map.jinja of type state
[209] Jinja comment should have spaces before and after: {# comment #}
salt/map.jinja:4
{## Start imports ##}

[209] Jinja comment should have spaces before and after: {# comment #}
salt/map.jinja:21
{## Merge in salt pillar ##}

[209] Jinja comment should have spaces before and after: {# comment #}
salt/map.jinja:24
{## Merge in salt_formulas pillar ##}
```
2019-10-09 18:34:12 +01:00

26 lines
963 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 %}
{# merge the osfamilymap #}
{% set osfamily = salt['grains.filter_by'](osfamilymap, grain='os_family') or{} %}
{% do salt['defaults.merge'](defaults['salt'], osfamily) %}
{# merge the osmap #}
{% set osmap = salt['grains.filter_by'](osmap, grain='os') or{} %}
{% do salt['defaults.merge'](defaults['salt'], osmap) %}
{# merge the lookup #}
{% set lookup = salt['pillar.get']('salt:lookup', default={}, merge=True) %}
{% do salt['defaults.merge'](defaults['salt'], lookup) %}
{#- 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) %}