salt/pillar/top.sls

15 lines
308 B
Plaintext
Raw Normal View History

{% 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('.', '_') }}