diff options
author | Georg Pfuetzenreuter | 2023-01-15 15:53:39 +0100 |
---|---|---|
committer | Georg Pfuetzenreuter | 2023-01-15 17:39:59 +0100 |
commit | eb1731e7a11bfc94f7a02a43b8e5db262660f03d (patch) | |
tree | 70ede2ecb51211f922ab82739ef5cfaf3972ff55 /pillar/role | |
parent | 11620c863cafff26152d8cdca49c369a5d69474f (diff) | |
download | salt-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')
-rw-r--r-- | pillar/role/salt/minion.sls | 8 |
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 %} |