2023-01-21 01:00:22 +01:00
|
|
|
{%- set id = salt['grains.get']('id') -%}
|
2023-01-22 16:52:22 +01:00
|
|
|
{%- set roles = salt['http.query']('http://machine-roles.lysergic.dev:4580/roles', decode=True, decode_type='json', params={"machine": id})['dict']['roles'] -%}
|
2023-01-15 11:41:05 +01:00
|
|
|
|
|
|
|
{{ saltenv }}:
|
|
|
|
'*':
|
|
|
|
- common
|
|
|
|
'{{ id }}':
|
2023-01-15 12:37:11 +01:00
|
|
|
- ignore_missing: True
|
2023-01-15 11:41:05 +01:00
|
|
|
- id.{{ id.replace('.', '_') }}
|
2023-01-22 16:32:57 +01:00
|
|
|
{%- for role in roles %}
|
2023-01-21 14:20:08 +01:00
|
|
|
- role.{{ role }}
|
|
|
|
{%- endfor %}
|