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:
|
salt:
|
||||||
minion_remove_config: True
|
minion_remove_config: True
|
||||||
minion:
|
minion:
|
||||||
master_type: str
|
master_type: str
|
||||||
master: {{ myconfig['salt_master'] }}
|
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:
|
- names:
|
||||||
- /etc/salt/grains:
|
- /etc/salt/grains:
|
||||||
- source: salt:///{{ slspath }}/files/etc/salt/grains.j2
|
- source: salt:///{{ slspath }}/files/etc/salt/grains.j2
|
||||||
|
- require_in:
|
||||||
salt_restart_minion:
|
- service: salt-minion
|
||||||
cmd.run:
|
- watch_in:
|
||||||
- name: 'salt-call service.restart salt-minion'
|
- service: salt-minion
|
||||||
- bg: True
|
|
||||||
- onchanges:
|
|
||||||
- file: salt_grains_file
|
|
||||||
|
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:
|
include:
|
||||||
- salt.minion
|
- profile.salt.minion
|
||||||
|
Loading…
Reference in New Issue
Block a user