From bad783ea28748a10af420636bc156d73f992622a Mon Sep 17 00:00:00 2001 From: Pavel Veretennikov Date: Fri, 13 Jan 2017 14:58:59 +0200 Subject: [PATCH] Fixes jinja in include block Some vars were missing {{ }} Indentation was broken isinstance is not available in Salt --- salt/files/minion.d/f_defaults.conf | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/salt/files/minion.d/f_defaults.conf b/salt/files/minion.d/f_defaults.conf index c6629f0..adcf055 100644 --- a/salt/files/minion.d/f_defaults.conf +++ b/salt/files/minion.d/f_defaults.conf @@ -340,25 +340,25 @@ mine_functions: # # Include a config file from some other path: {% if 'include' in cfg_minion -%} -{%- do default_keys.append('include') %} - {% if isinstance(cfg_minion['include'], list) -%} +{% do default_keys.append('include') -%} + {% if cfg_minion['include'] is iterable and cfg_minion['include'] is not string -%} include: - {% for include in cfg_minion['include'] -%} + {%- for include in cfg_minion['include'] %} - {{ include }} - {% endfor -%} + {%- endfor -%} {% else -%} - include: cfg_minion['include'] - {% endif -%} + include: {{ cfg_minion['include'] }} + {%- endif -%} {% elif 'include' in cfg_salt -%} - {% if isinstance(cfg_salt['include'], list) -%} + {% if cfg_salt['include'] is iterable and cfg_salt['include'] is not string -%} include: - {% for include in cfg_salt['include'] -%} + {%- for include in cfg_salt['include'] %} - {{ include }} - {% endfor -%} + {%- endfor -%} {% else -%} - include: cfg_salt['include'] - {% endif -%} -{% endif -%} + include: {{ cfg_salt['include'] }} + {%- endif -%} +{% endif %} ##### Minion module management ##### ##########################################