0
0
mirror of https://github.com/saltstack-formulas/salt-formula.git synced 2024-11-28 00:48:02 +01:00

Merge pull request #230 from bersace/json-render

Render config as JSON
This commit is contained in:
Forrest 2016-05-29 22:43:29 -07:00
commit d3476bae04

View File

@ -6,11 +6,11 @@
{% set cfg_minion = cfg_salt.get('minion', {}) -%}
{%- macro get_config(configname, default_value) -%}
{%- if configname in cfg_minion -%}
{{ configname }}: {{ cfg_minion[configname] }}
{{ configname }}: {{ cfg_minion[configname]|json }}
{%- elif configname in cfg_salt and configname not in reserved_keys -%}
{{ configname }}: {{ cfg_salt[configname] }}
{{ configname }}: {{ cfg_salt[configname]|json }}
{%- else -%}
#{{ configname }}: {{ default_value }}
#{{ configname }}: {{ default_value|json }}
{%- endif -%}
{%- endmacro -%}
{%- from 'salt/formulas.jinja' import file_roots, formulas with context -%}