Skip to content

Commit

Permalink
fix(map.jinja): use tplroot
Browse files Browse the repository at this point in the history
When updating a formula the following should be sufficient:

```
cp template-formula/template/map.jinja my-formula/my/map.jinja
sed -i '/set template =/set my =/' my-formula/my/map.jinja
```

Based on the work of @myii!
  • Loading branch information
alxwr committed May 15, 2019
1 parent f4c7226 commit b9c5e03
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions template/map.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
{%- import_yaml tplroot ~ "/osfingermap.yaml" as osfingermap %}

{%- set defaults = salt['grains.filter_by'](default_settings,
default='template',
default=tplroot,
merge=salt['grains.filter_by'](osfamilymap, grain='os_family',
merge=salt['grains.filter_by'](osmap, grain='os',
merge=salt['grains.filter_by'](osfingermap, grain='osfinger',
merge=salt['config.get']('template:lookup', default={})
merge=salt['config.get'](tplroot ~ ':lookup', default={})
)
)
)
) %}

{#- Merge the template config (e.g. from pillar) #}
{%- set template = salt['config.get']('template', default=defaults) %}
{%- set template = salt['config.get'](tplroot, default=defaults) %}

0 comments on commit b9c5e03

Please sign in to comment.