Skip to content
Snippets Groups Projects
Commit 442806ab authored by Javier Bértoli's avatar Javier Bértoli
Browse files

Allow to specify different reactors for minions and masters

parent eaf9fc98
Branches Kampfsystem
No related tags found
No related merge requests found
...@@ -95,6 +95,13 @@ salt: ...@@ -95,6 +95,13 @@ salt:
type: runner type: runner
cmd: jobs.list_jobs 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: # salt minion config:
minion: minion:
...@@ -171,6 +178,12 @@ salt: ...@@ -171,6 +178,12 @@ salt:
- 1.0 - 1.0
interval: 10 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 # salt cloud config
cloud: cloud:
...@@ -229,9 +242,7 @@ salt: ...@@ -229,9 +242,7 @@ salt:
- IAD - IAD
- SYD - SYD
- HKG - HKG
reactor:
- 'deploy':
- /srv/salt/reactors/deploy.sls
ssh_roster: ssh_roster:
prod1: prod1:
host: host.example.com host: host.example.com
...@@ -249,6 +260,11 @@ salt: ...@@ -249,6 +260,11 @@ salt:
pub: | pub: |
........... ...........
# These reactors will be configured both to the minion and the master
reactors:
- 'deploy':
- /srv/salt/reactors/deploy.sls
salt_cloud_certs: salt_cloud_certs:
aws: aws:
pem: | pem: |
......
# #
# This file is managed by Salt! Do not edit by hand! # 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: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 %} {%- if reactors %}
reactor: reactor:
{%- for reactor in reactors %} {%- for reactor in reactors %}
......
# #
# This file is managed by Salt! Do not edit by hand! # 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: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 %} {%- if reactors %}
reactor: reactor:
{%- for reactor in reactors %} {%- for reactor in reactors %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment