From eb1731e7a11bfc94f7a02a43b8e5db262660f03d Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Sun, 15 Jan 2023 15:53:39 +0100 Subject: Move managed grains to minion pillar Signed-off-by: Georg Pfuetzenreuter --- pillar/role/salt/minion.sls | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'pillar/role/salt') diff --git a/pillar/role/salt/minion.sls b/pillar/role/salt/minion.sls index f67ec63..9b1c850 100644 --- a/pillar/role/salt/minion.sls +++ b/pillar/role/salt/minion.sls @@ -1,5 +1,11 @@ +{%- set myconfig = pillar['netbox']['config_context'] -%} + salt: minion_remove_config: True minion: master_type: str - master: {{ pillar['netbox']['config_context']['salt_master'] }} + master: {{ myconfig['salt_master'] }} + {%- if 'roles' in myconfig and myconfig['roles'] | length > 0 %} + grains: + roles: {{ myconfig['roles'] }} + {%- endif %} -- cgit v1.2.3