Skip to content

Commit

Permalink
Fix master_tops configuration rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
iondulgheru authored and dulgheru committed May 24, 2017
1 parent eaf9fc9 commit d2c0115
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions salt/files/master.d/f_defaults.conf
Original file line number Diff line number Diff line change
Expand Up @@ -746,14 +746,21 @@ rosters:
{%- do default_keys.append('master_tops') %}
master_tops:
{%- for master in cfg_master['master_tops'] -%}
{%- if cfg_master['master_tops'][master] is string %}
{{ master }}: {{ cfg_master['master_tops'][master] }}
{%- else %}
{%- if cfg_master['master_tops'][master] is mapping %}
{{ master}}:
{%- for parameter in cfg_master['master_tops'][master] %}
{{ parameter }}: {{ cfg_master['master_tops'][master][parameter] }}
{%- endfor -%}
{%- endif -%}
{%- elif cfg_master['master_tops'][master] is string %}
{{ master }}: {{ cfg_master['master_tops'][master] }}
{%- elif cfg_master['master_tops'][master] is iterable %}
{{ master}}:
{%- for item in cfg_master['master_tops'][master] %}
- {{ item }}
{%- endfor -%}
{%else%}
{{ master }}: {{ cfg_master['master_tops'][master] }}
{%endif%}
{%- endfor %}
{% endif %}

Expand Down

0 comments on commit d2c0115

Please sign in to comment.