Commit e13ed27a50819ad220cb62bbdef449679bda9965
less over-thinking
Michael Williams committed on 12/24/2017, 1:54:28 AMParent: 784864d05c53a017443132c04769c3b9116bcc02
Files changed
example/salt/pillar/top.sls | changed |
salt/state/top.sls | changed |
example/salt/pillar/top.sls | ||
---|---|---|
@@ -1,9 +1,9 @@ | ||
1 | -production: | |
1 … | +base: | |
2 | 2 … | '*': |
3 | 3 … | - agents |
4 | - {% set roles = salt['grains.get']('roles', []) -%} | |
5 | - {% for role in roles -%} | |
6 | - 'roles:{{ role }}': | |
4 … | + 'roles:master': | |
7 | 5 … | - match: grain |
8 | - - {{ role }} | |
9 | - {% endfor -%} | |
6 … | + - salt | |
7 … | + 'roles:minion': | |
8 … | + - match: grain | |
9 … | + - salt |
salt/state/top.sls | ||
---|---|---|
@@ -1,14 +1,7 @@ | ||
1 | -production: | |
2 | - {% set roles = salt['grains.get']('roles', []) -%} | |
3 | - {% for role in roles -%} | |
4 | - 'roles:{{ role }}': | |
1 … | +base: | |
2 … | + 'roles:master': | |
5 | 3 … | - match: grain |
6 | - {% if role == 'master' -%} | |
7 | 4 … | - salt.master |
8 | - {% elif role == 'minion' -%} | |
5 … | + 'roles:minion': | |
6 … | + - match: grain | |
9 | 7 … | - salt.minion |
10 | - {% else -%} | |
11 | - - {{ role }} | |
12 | - {% endif %} | |
13 | - | |
14 | - {% endfor %} |
Built with git-ssb-web