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 }}:
|
{{ saltenv }}:
|
||||||
'*':
|
'*':
|
||||||
- common
|
- common
|
||||||
{% for role in roles %}
|
|
||||||
'roles:{{ role }}':
|
|
||||||
- match: grain
|
|
||||||
- role.{{ role }}
|
|
||||||
{%- endfor %}
|
|
||||||
'{{ id }}':
|
'{{ id }}':
|
||||||
- ignore_missing: True
|
- ignore_missing: True
|
||||||
- id.{{ id.replace('.', '_') }}
|
- id.{{ id.replace('.', '_') }}
|
||||||
|
{% for role in roles %}
|
||||||
|
- role.{{ role }}
|
||||||
|
{%- endfor %}
|
||||||
|
@ -4,8 +4,9 @@
|
|||||||
{{ saltenv }}:
|
{{ saltenv }}:
|
||||||
'*':
|
'*':
|
||||||
- common
|
- common
|
||||||
|
{%- if roles | length > 0 %}
|
||||||
|
'{{ id }}':
|
||||||
{% for role in roles %}
|
{% for role in roles %}
|
||||||
'roles:{{ role }}':
|
|
||||||
- match: grain
|
|
||||||
- role.{{ role }}
|
- role.{{ role }}
|
||||||
{% endfor %}
|
{%- endfor %}
|
||||||
|
{%- endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user