Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed file_roots config generation with several environment #37

Merged
merged 1 commit into from May 10, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions salt/files/master
Original file line number Diff line number Diff line change
Expand Up @@ -343,20 +343,20 @@ client_acl_blacklist:
# - /srv/salt/prod/states
{% if 'file_roots' in master -%}
file_roots:
{% for name, roots in master['file_roots'].items() -%}
{%- for name, roots in master['file_roots']|dictsort %}
{{ name }}:
{% for dir in roots -%}
- {{ dir }}
{% endfor -%}
{% endfor -%}
{%- for dir in roots %}
- {{ dir }}
{%- endfor -%}
{%- endfor -%}
{% elif 'file_roots' in salt -%}
file_roots:
{% for name, roots in salt['file_roots'].items() -%}
{%- for name, roots in salt['file_roots']|dictsort %}
{{ name }}:
{% for dir in roots -%}
- {{ dir }}
{% endfor -%}
{% endfor -%}
{%- for dir in roots %}
- {{ dir }}
{%- endfor -%}
{%- endfor -%}
{% else -%}
#file_roots:
# base:
Expand Down Expand Up @@ -513,20 +513,20 @@ gitfs_remotes:
# highstate format, and is generally just key/value pairs.
{% if 'pillar_roots' in master -%}
pillar_roots:
{% for name, roots in master['pillar_roots'].items() -%}
{%- for name, roots in master['pillar_roots']|dictsort %}
{{ name }}:
{% for dir in roots -%}
- {{ dir }}
{% endfor -%}
{% endfor -%}
{%- for dir in roots %}
- {{ dir }}
{%- endfor -%}
{%- endfor -%}
{% elif 'pillar_roots' in salt -%}
pillar_roots:
{% for name, roots in salt['pillar_roots'].items() -%}
{%- for name, roots in salt['pillar_roots'].items() -%}
{{ name }}:
{% for dir in roots -%}
- {{ dir }}
{% endfor -%}
{% endfor -%}
{%- for dir in roots -%}
- {{ dir }}
{%- endfor -%}
{%- endfor -%}
{% else %}
#pillar_roots:
# base:
Expand Down