Use traditional grains management

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
Georg Pfuetzenreuter 2023-01-15 17:06:29 +01:00
parent eb1731e7a1
commit fe2a1a21b9
Signed by: Georg
GPG Key ID: 1ED2F138E7E6FF57
4 changed files with 8 additions and 14 deletions

View File

@ -1,11 +1,5 @@
{%- set myconfig = pillar['netbox']['config_context'] -%}
salt:
minion_remove_config: True
minion:
master_type: str
master: {{ myconfig['salt_master'] }}
{%- if 'roles' in myconfig and myconfig['roles'] | length > 0 %}
grains:
roles: {{ myconfig['roles'] }}
{%- endif %}

View File

@ -6,10 +6,7 @@ salt_grains_file:
- names:
- /etc/salt/grains:
- source: salt:///{{ slspath }}/files/etc/salt/grains.j2
salt_restart_minion:
cmd.run:
- name: 'salt-call service.restart salt-minion'
- bg: True
- onchanges:
- file: salt_grains_file
- require_in:
- service: salt-minion
- watch_in:
- service: salt-minion

View File

@ -0,0 +1,3 @@
include:
- salt.minion
- .grains

View File

@ -1,2 +1,2 @@
include:
- salt.minion
- profile.salt.minion