Parcourir la source

Merge pull request #97 from aboe76/multi_master

Fix #39 multi master support to minion
master
Nitin Madhok il y a 10 ans
Parent
révision
1b13259823
2 fichiers modifiés avec 27 ajouts et 0 suppressions
  1. +8
    -0
      pillar.example
  2. +19
    -0
      salt/files/minion.d/_defaults.conf

+ 8
- 0
pillar.example Voir le fichier

@@ -30,7 +30,15 @@ salt:
# salt minion config:
minion:

# single master setup
master: salt
# multi master setup
master:
- salt_master_1
- salt_master_2
fileserver_backend:
- git
- roots

+ 19
- 0
salt/files/minion.d/_defaults.conf Voir le fichier

@@ -23,7 +23,26 @@

# Set the location of the salt master server. If the master server cannot be
# resolved, then the minion will fail to start.
# master:salt
{%- if 'master' in cfg_minion -%}
{%- if cfg_minion['master'] is not string %}
master:
{% for name in cfg_minion['master'] -%}
- {{ name }}
{% endfor -%}
{%- else %}
{{ get_config('master', 'salt') }}
{%- endif %}
{% elif 'master' in cfg_salt -%}
{%- if cfg_salt['master'] is not string %}
master:
{% for name in cfg_salt['master'] -%}
- {{ name }}
{% endfor -%}
{%- else %}
{{ get_config('master', 'salt') }}
{%- endif -%}
{%- endif %}

# If multiple masters are specified in the 'master' setting, the default behavior
# is to always try to connect to them in the order they are listed. If random_master is

Chargement…
Annuler
Enregistrer