summaryrefslogtreecommitdiffstats
path: root/pillar/role/salt/minion.sls
diff options
context:
space:
mode:
authorGeorg Pfuetzenreuter2023-01-15 15:53:39 +0100
committerGeorg Pfuetzenreuter2023-01-15 17:39:59 +0100
commiteb1731e7a11bfc94f7a02a43b8e5db262660f03d (patch)
tree70ede2ecb51211f922ab82739ef5cfaf3972ff55 /pillar/role/salt/minion.sls
parent11620c863cafff26152d8cdca49c369a5d69474f (diff)
downloadsalt-eb1731e7a11bfc94f7a02a43b8e5db262660f03d.tar.gz
salt-eb1731e7a11bfc94f7a02a43b8e5db262660f03d.tar.bz2
salt-eb1731e7a11bfc94f7a02a43b8e5db262660f03d.zip
Move managed grains to minion pillar
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
Diffstat (limited to 'pillar/role/salt/minion.sls')
-rw-r--r--pillar/role/salt/minion.sls8
1 files changed, 7 insertions, 1 deletions
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 %}