Skip to content

Commit

Permalink
refactor(map): load defaults.jinja configuration with libmapstack
Browse files Browse the repository at this point in the history
  • Loading branch information
baby-gnu committed Jan 11, 2021
1 parent 568bb7c commit 174bb68
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions openssh/map.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,12 @@

{#- Load formula defaults values #}
{%- set _defaults_filename = map_sources_dir ~ "/defaults.yaml" %}
{%- do salt["log.debug"](
"map.jinja: load per formula default values from "
~ _defaults_filename
) %}
{%- load_yaml as default_settings %}
{%- include _defaults_filename ignore missing %}
{%- endload %}

{%- if not default_settings %}
{%- set default_settings = {'values': {} } %}
{%- endif %}

{%- set default_settings = mapstack(
files=[_defaults_filename],
defaults={"values": {} },
log_prefix="map.jinja defaults: ",
)
| load_yaml %}
{#- Make sure to track `map.jinja` configuration with `_mapdata` #}
{%- do default_settings["values"].update(
{
Expand Down

0 comments on commit 174bb68

Please sign in to comment.