Connect syndic minions to syndic master
Some checks failed
ci/lysergic/push/pipeline Pipeline failed
Some checks failed
ci/lysergic/push/pipeline Pipeline failed
Syndics are generally the masters assigned to their region. We want the minions on syndics to connect to their upstream master ("master of masters") instead of to themselves. Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
parent
a5754ea0cb
commit
3572a13b38
@ -1,7 +1,14 @@
|
||||
{%- set netbox_pillar = salt['pillar.get']('netbox') -%}
|
||||
{%- if 'salt.syndic' in netbox_pillar['custom_fields']['salt_roles'] -%}
|
||||
{%- set master = salt['pillar.get']('salt:master:syndic_master') -%}
|
||||
{%- else -%}
|
||||
{%- set master = netbox_pillar['config_context']['salt_master'] -%}
|
||||
{%- endif -%}
|
||||
|
||||
/etc/salt/minion.d/master.conf:
|
||||
file.managed:
|
||||
- contents:
|
||||
- 'master: {{ salt['pillar.get']('netbox:config_context:salt_master') }}'
|
||||
- 'master: {{ master }}'
|
||||
- require_in:
|
||||
- service: salt-minion
|
||||
- watch_in:
|
||||
|
Loading…
x
Reference in New Issue
Block a user