salt/pillar/top.sls
Georg Pfuetzenreuter ba563b6bb1
Ignore missing ID's
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
2023-01-15 12:37:11 +01:00

15 lines
308 B
Plaintext

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