浏览代码

Fix nested file,pillar _roots in minion and master templates

See #37 "Fixed file_roots config generation with several environment"
master
Wes Turner 10 年前
父节点
当前提交
bc7ccedf45
共有 2 个文件被更改,包括 24 次插入24 次删除
  1. +2
    -2
      salt/files/master
  2. +22
    -22
      salt/files/minion

+ 2
- 2
salt/files/master 查看文件

@@ -521,9 +521,9 @@ pillar_roots:
{%- endfor -%}
{% elif 'pillar_roots' in salt -%}
pillar_roots:
{%- for name, roots in salt['pillar_roots'].items() -%}
{%- for name, roots in salt['pillar_roots']|dictsort %}
{{ name }}:
{%- for dir in roots -%}
{%- for dir in roots %}
- {{ dir }}
{%- endfor -%}
{%- endfor -%}

+ 22
- 22
salt/files/minion 查看文件

@@ -404,20 +404,20 @@ id: {{ minion['id'] }}
#
{% if 'file_roots' in minion -%}
file_roots:
{% for name, roots in minion['file_roots'].items() -%}
{%- for name, roots in minion['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:
@@ -444,24 +444,24 @@ file_roots:
# also be configured on the minion:
{% if 'pillar_roots' in minion -%}
pillar_roots:
{% for name, roots in minion['pillar_roots'].items() -%}
{%- for name, roots in minion['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']|dictsort %}
{{ name }}:
{% for dir in roots -%}
- {{ dir }}
{% endfor -%}
{% endfor -%}
{% else %}
{%- for dir in roots %}
- {{ dir }}
{%- endfor -%}
{%- endfor -%}
{% else -%}
#pillar_roots:
# base:
# - /srv/pillar
# - /srv/salt
{%- endif %}

###### Security settings #####

正在加载...
取消
保存