summaryrefslogtreecommitdiffstats
path: root/salt
diff options
context:
space:
mode:
Diffstat (limited to 'salt')
-rw-r--r--salt/top.sls7
1 files changed, 4 insertions, 3 deletions
diff --git a/salt/top.sls b/salt/top.sls
index a534cc5..632d4a2 100644
--- a/salt/top.sls
+++ b/salt/top.sls
@@ -4,8 +4,9 @@
{{ saltenv }}:
'*':
- common
+ {%- if roles | length > 0 %}
+ '{{ id }}':
{% for role in roles %}
- 'roles:{{ role }}':
- - match: grain
- role.{{ role }}
- {% endfor %}
+ {%- endfor %}
+ {%- endif %}