Pārlūkot izejas kodu

Allow to specify different reactors for minions and masters

tags/v0.57.0
Javier Bértoli pirms 7 gadiem
vecāks
revīzija
442806ab9e
3 mainītis faili ar 27 papildinājumiem un 3 dzēšanām
  1. +19
    -3
      pillar.example
  2. +4
    -0
      salt/files/master.d/reactor.conf
  3. +4
    -0
      salt/files/minion.d/reactor.conf

+ 19
- 3
pillar.example Parādīt failu

@@ -95,6 +95,13 @@ salt:
type: runner
cmd: jobs.list_jobs

# optional: these reactors will be configured on the master
# They override reactors configured in
# 'salt:reactors' or the old 'salt:reactor' parameters
reactors:
- 'master/deploy':
- /srv/salt/reactors/deploy.sls

# salt minion config:
minion:

@@ -171,6 +178,12 @@ salt:
- 1.0
interval: 10

# Optional reactors: these reactors will be configured on the minion
# They override reactors configured in
# 'salt:reactors' or the old 'salt:reactor' parameters
reactors:
- 'master/deploy':
- /srv/salt/reactors/deploy.sls

# salt cloud config
cloud:
@@ -229,9 +242,7 @@ salt:
- IAD
- SYD
- HKG
reactor:
- 'deploy':
- /srv/salt/reactors/deploy.sls

ssh_roster:
prod1:
host: host.example.com
@@ -249,6 +260,11 @@ salt:
pub: |
...........

# These reactors will be configured both to the minion and the master
reactors:
- 'deploy':
- /srv/salt/reactors/deploy.sls

salt_cloud_certs:
aws:
pem: |

+ 4
- 0
salt/files/master.d/reactor.conf Parādīt failu

@@ -1,7 +1,11 @@
#
# This file is managed by Salt! Do not edit by hand!
#
{# The parameter reactor is kept for backward compatibility -#}
{%- set reactors = salt['pillar.get']('salt:reactor') -%}
{%- set reactors = salt['pillar.get']('salt:reactors', default=reactors, merge=True) -%}
{%- set reactors = salt['pillar.get']('salt:master:reactors', default=reactors, merge=True) -%}

{%- if reactors %}
reactor:
{%- for reactor in reactors %}

+ 4
- 0
salt/files/minion.d/reactor.conf Parādīt failu

@@ -1,7 +1,11 @@
#
# This file is managed by Salt! Do not edit by hand!
#
{# The parameter reactor is kept for backward compatibility -#}
{%- set reactors = salt['pillar.get']('salt:reactor') -%}
{%- set reactors = salt['pillar.get']('salt:reactors', default=reactors, merge=True) -%}
{%- set reactors = salt['pillar.get']('salt:minion:reactors', default=reactors, merge=True) -%}

{%- if reactors %}
reactor:
{%- for reactor in reactors %}

Notiek ielāde…
Atcelt
Saglabāt