refactor(map): load `defaults.jinja` configuration with `libmapstack`
This commit is contained in:
parent
568bb7ce40
commit
174bb68432
|
@ -44,18 +44,12 @@
|
||||||
|
|
||||||
{#- Load formula defaults values #}
|
{#- Load formula defaults values #}
|
||||||
{%- set _defaults_filename = map_sources_dir ~ "/defaults.yaml" %}
|
{%- set _defaults_filename = map_sources_dir ~ "/defaults.yaml" %}
|
||||||
{%- do salt["log.debug"](
|
{%- set default_settings = mapstack(
|
||||||
"map.jinja: load per formula default values from "
|
files=[_defaults_filename],
|
||||||
~ _defaults_filename
|
defaults={"values": {} },
|
||||||
) %}
|
log_prefix="map.jinja defaults: ",
|
||||||
{%- load_yaml as default_settings %}
|
)
|
||||||
{%- include _defaults_filename ignore missing %}
|
| load_yaml %}
|
||||||
{%- endload %}
|
|
||||||
|
|
||||||
{%- if not default_settings %}
|
|
||||||
{%- set default_settings = {'values': {} } %}
|
|
||||||
{%- endif %}
|
|
||||||
|
|
||||||
{#- Make sure to track `map.jinja` configuration with `_mapdata` #}
|
{#- Make sure to track `map.jinja` configuration with `_mapdata` #}
|
||||||
{%- do default_settings["values"].update(
|
{%- do default_settings["values"].update(
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue