From 12f0a7bce0b2ed747a0a3e5e6df1d8e7104b8b33 Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Sat, 21 Jan 2023 14:20:08 +0100 Subject: Target roles without grains in tops Signed-off-by: Georg Pfuetzenreuter --- salt/top.sls | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'salt/top.sls') 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 %} -- cgit v1.2.3