Commit 1572d84eb2c2ae8ff7104de475dcbacbfafe818d
guess something
Michael Williams committed on 12/23/2017, 1:27:21 PMParent: 41a9e23328db99c055dda3f7889f74141df9ba65
Files changed
salt/state/top.sls | changed |
salt/state/salt.sls | deleted |
salt/state/top.sls | |||
---|---|---|---|
@@ -1,6 +1,15 @@ | |||
1 | 1 … | production: | |
2 | - {% for role in salt['grains.get']('roles', []) %} | ||
2 … | + '*': | ||
3 … | + - agents | ||
4 … | + {% set roles = salt['grains.get']('roles', []) -%} | ||
5 … | + {% for role in roles -%} | ||
3 | 6 … | 'roles:{{ role }}': | |
4 | 7 … | - match: grain | |
8 … | + {% if role == 'master' -%} | ||
9 … | + - salt.master | ||
10 … | + {% elif role == 'minion' -%} | ||
11 … | + - salt.minion | ||
12 … | + {% else %} | ||
5 | 13 … | - {{ role }} | |
6 | - {% endfor %} | ||
14 … | + {% endif %} | ||
15 … | + {% endfor -%} |
salt/state/salt.sls | ||
---|---|---|
@@ -1,22 +1,0 @@ | ||
1 | -{% set roles = salt['grains.get']('roles', []) %} | |
2 | -{% if 'salt' in roles %} | |
3 | - | |
4 | -{% for salt in ['master', 'minion'] %} | |
5 | -{% if salt in roles %} | |
6 | - | |
7 | -/etc/salt/{{salt}}: | |
8 | - file.managed: | |
9 | - - source: salt://{{salt}} | |
10 | - - user: root | |
11 | - - group: root | |
12 | - - mode: 644 | |
13 | - - template: jinja | |
14 | - - defaults: | |
15 | - git_pubkey: /root/.ssh/id_rsa | |
16 | - git_privkey: /root/.ssh/id_rsa.pub | |
17 | - state_git: git@github.com:ahdinosaur/butt-as-a-service | |
18 | - | |
19 | -{% endif %} | |
20 | -{% endfor %} | |
21 | - | |
22 | -{% endif %} |
Built with git-ssb-web