From 0457625204a114a03c1f84b587f9bd003493b1c3 Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Sun, 22 Jan 2023 22:32:39 +0100 Subject: Enforce ID and roles in top Adapt to current private pillar top: - match ID grain for inclusion of ID files - move roles under conditional Signed-off-by: Georg Pfuetzenreuter --- pillar/top.sls | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pillar/top.sls b/pillar/top.sls index d4c7639..ac21037 100644 --- a/pillar/top.sls +++ b/pillar/top.sls @@ -4,9 +4,14 @@ {{ saltenv }}: '*': - common - '{{ id }}': + 'id:{{ id }}': + - match: grain - ignore_missing: True - id.{{ id.replace('.', '_') }} - {%- for role in roles %} +{%- if roles | length > 0 %} + '{{ id }}': + {% for role in roles %} + - ignore_missing: True - role.{{ role }} {%- endfor %} +{%- endif %} -- cgit v1.2.3