-
Notifications
You must be signed in to change notification settings - Fork 0
/
roots.conf
27 lines (25 loc) · 927 Bytes
/
roots.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#
# This file is auto-generated via Salt
# DO NOT EDIT MANUALLY
#
file_roots:
base:
- /devops/sw2/srv-salt
- /devops/projects/common/salt/roots
- /srv/salt/base
{%- for project in salt['file.find'](salt_projects_root, type='d', maxdepth=0, print='name')
if project != '/srv/salt/master' -%}
{%- set branch_dirs = [] -%}
{%- for branch_dir in salt['file.find'](salt_projects_root + '/' + project, type='d', maxdepth=0, print='name') -%}
{%- set i = branch_dirs.append(branch_dir) -%}
{%- endfor -%}
{%- for branch in branch_dirs if branch != 'master' %}
{%- if salt['file.contains'](salt_projects_root + '/' + project + '/' + branch + '/salt/roots/top.sls', "I@sw2.salt_branch") %}
{{ project }}-{{ branch }}:
- {{ salt_projects_root}}/{{ project }}/{{ branch }}/salt/roots
- /devops/sw2/srv-salt
- /devops/projects/common/salt/roots
- /srv/salt/base
{%- endif %}
{%- endfor %}
{%- endfor %}