salt/pillar/top.sls
Georg Pfuetzenreuter 12f0a7bce0
Target roles without grains in tops
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
2023-01-21 14:26:31 +01:00

13 lines
263 B
Plaintext

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