From aff75ce8acb0d705d55040614f0a8b7831971939 Mon Sep 17 00:00:00 2001 From: Matthew Richardson Date: Sun, 1 Jul 2018 22:09:34 +0100 Subject: [PATCH] Handle other non-iterable values like int/float. --- 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 7f6d08b..dbbfe89 100644 --- a/salt/files/minion.d/f_defaults.conf +++ b/salt/files/minion.d/f_defaults.conf @@ -1250,13 +1250,13 @@ alternative.mongo.{{ name }}: {{ value }} {%- for configname in cfg_minion %} {%- if configname not in reserved_keys and configname not in default_keys %} - {%- if cfg_minion[configname] is string %} -{{ configname }}: {{ cfg_minion[configname]|json }} - {%- elif cfg_minion[configname] is iterable %} + {%- if cfg_minion[configname] is iterable and cfg_minion[configname] is not string %} {{ configname }}: {%- for item in cfg_minion[configname] %} - {{ item }} {%- endfor -%} + {%- else %} +{{ configname }}: {{ cfg_minion[configname]|json }} {%- endif %} {%- endif %} {%- endfor %}