Target roles without grains in tops
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
parent
91fd60c5a3
commit
12f0a7bce0
@ -4,11 +4,9 @@
|
||||
{{ saltenv }}:
|
||||
'*':
|
||||
- common
|
||||
{% for role in roles %}
|
||||
'roles:{{ role }}':
|
||||
- match: grain
|
||||
- role.{{ role }}
|
||||
{%- endfor %}
|
||||
'{{ id }}':
|
||||
- ignore_missing: True
|
||||
- id.{{ id.replace('.', '_') }}
|
||||
{% for role in roles %}
|
||||
- role.{{ role }}
|
||||
{%- endfor %}
|
||||
|
@ -4,8 +4,9 @@
|
||||
{{ saltenv }}:
|
||||
'*':
|
||||
- common
|
||||
{%- if roles | length > 0 %}
|
||||
'{{ id }}':
|
||||
{% for role in roles %}
|
||||
'roles:{{ role }}':
|
||||
- match: grain
|
||||
- role.{{ role }}
|
||||
{% endfor %}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user