Browse Source

Render config as JSON

tags/v0.57.0
Étienne BERSAC 8 years ago
parent
commit
adad72741e
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      salt/files/minion.d/f_defaults.conf

+ 3
- 3
salt/files/minion.d/f_defaults.conf View File

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

Loading…
Cancel
Save