Use traditional grains management
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
parent
eb1731e7a1
commit
fe2a1a21b9
@ -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 %}
|
||||
|
@ -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
|
||||
|
3
salt/profile/salt/minion.sls
Normal file
3
salt/profile/salt/minion.sls
Normal file
@ -0,0 +1,3 @@
|
||||
include:
|
||||
- salt.minion
|
||||
- .grains
|
@ -1,2 +1,2 @@
|
||||
include:
|
||||
- salt.minion
|
||||
- profile.salt.minion
|
||||
|
Loading…
Reference in New Issue
Block a user