salt/pillar/top.sls
Georg Pfuetzenreuter bf0dfeb941
Use nbroles instead of grains
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
2023-01-21 01:22:29 +01:00

15 lines
304 B
Plaintext

{%- set id = salt['grains.get']('id') -%}
{%- set roles = salt['nbroles.get'](id) -%}
{{ saltenv }}:
'*':
- common
{% for role in roles %}
'roles:{{ role }}':
- match: grain
- role.{{ role }}
{%- endfor %}
'{{ id }}':
- ignore_missing: True
- id.{{ id.replace('.', '_') }}