From d5c10f560012001fe443b8f94d425966afc058d2 Mon Sep 17 00:00:00 2001 From: Christian McHugh Date: Mon, 28 Aug 2017 07:04:43 +0100 Subject: [PATCH] fix indenting around peer run. Convert extra configs from json to yaml --- salt/files/master.d/f_defaults.conf | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/salt/files/master.d/f_defaults.conf b/salt/files/master.d/f_defaults.conf index 9f78ac3..cb84ad7 100644 --- a/salt/files/master.d/f_defaults.conf +++ b/salt/files/master.d/f_defaults.conf @@ -1443,21 +1443,21 @@ peer: {% if 'peer_run' in cfg_master %} {%- do default_keys.append('peer_run') %} peer_run: - {% for name, roots in cfg_master['peer_run'].items() %} + {%- for name, roots in cfg_master['peer_run'].items() %} {{ name }}: - {% for mod in roots %} + {%- for mod in roots %} - {{ mod }} - {% endfor %} - {% endfor %} -{% elif 'peer_run' in cfg_salt %} + {%- endfor %} + {%- endfor %} +{%- elif 'peer_run' in cfg_salt %} peer_run: - {% for name, roots in cfg_salt['peer_run'].items() %} + {%- for name, roots in cfg_salt['peer_run'].items() %} {{ name }}: - {% for mod in roots %} + {%- for mod in roots %} - {{ mod }} - {% endfor %} - {% endfor %} -{% endif %} + {%- endfor %} + {%- endfor %} +{%- endif %} ##### Mine settings ##### ##################################### @@ -1776,6 +1776,7 @@ alternative.mongo.{{ name }}: {{ value }} {%- for configname in cfg_master %} {%- if configname not in reserved_keys and configname not in default_keys %} -{{ configname }}: {{ cfg_master[configname]|json }} +{{ configname }}: + {{ cfg_master[configname]| yaml(False) | indent(2) }} {%- endif %} {%- endfor %}