Enforce ID and roles in top
Some checks failed
ci/lysergic/push/pipeline Pipeline failed

Adapt to current private pillar top:
- match ID grain for inclusion of ID files
- check for role existence

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
Georg Pfuetzenreuter 2023-01-22 22:32:39 +01:00
parent 48c9e05de1
commit 772f6b374a
Signed by: Georg
GPG Key ID: 1ED2F138E7E6FF57

View File

@ -4,9 +4,13 @@
{{ saltenv }}:
'*':
- common
'{{ id }}':
'id:{{ id }}':
- match: grain
- ignore_missing: True
- id.{{ id.replace('.', '_') }}
{%- for role in roles %}
{%- if roles | length > 0 %}
'{{ id }}':
{% for role in roles %}
- role.{{ role }}
{%- endfor %}
{%- endif %}