git ssb

1+

dinoworm ๐Ÿ› / butt-as-a-service



Tree: b3b5e786806c8e137c4383c6a3c761b8d6221c36

Files: b3b5e786806c8e137c4383c6a3c761b8d6221c36 / salt / state / cloud.sls

712 bytesRaw
1{% set roles_by_service = {
2 'hub': [
3 'master'
4 ],
5 'pub': [
6 'minion'
7 ]
8%}
9{% set agents = salt['pillar.get']('agents', []) %}
10{% for agent in agents %}
11
12{% if agent.type == 'bot' %}
13
14{% set size = agent.size || 'small' %}
15{% set profile = salt['pillar.get']('cloud.profiles_' + size, []) %}
16
17{{agent.name}}:
18 cloud.present:
19 - script: bootstrap-salt
20 - script_args: -P git v2017.7.2
21 {% for key, value in profile.items() %}
22 - {{ key }}: {{ value }}
23 {% endfor %}
24 - minion:
25 grains:
26 env: production
27 roles:
28 - salt
29 {% for role in roles_by_service[agent.service] %}
30 - {{ role }}
31 {% endfor %}
32
33{% endif %}
34
35{% endfor %}
36

Built with git-ssb-web