From adad72741e48fc1281a528073c35c31b00c95dd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20BERSAC?= Date: Sun, 29 May 2016 20:42:41 +0200 Subject: [PATCH] Render config as JSON --- salt/files/minion.d/f_defaults.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/salt/files/minion.d/f_defaults.conf b/salt/files/minion.d/f_defaults.conf index cec953a..84661bf 100644 --- a/salt/files/minion.d/f_defaults.conf +++ b/salt/files/minion.d/f_defaults.conf @@ -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 -%}