Skip to content

Commit

Permalink
Merge pull request #313 from iondulgheru/master
Browse files Browse the repository at this point in the history
Fix master_tops configuration rendering
  • Loading branch information
aboe76 authored Aug 13, 2017
2 parents 8ad2bb6 + 165f2d7 commit d6389b8
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 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 %}
{{ master}}:
{%- 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 d6389b8

Please sign in to comment.