address: https://git.openstack.org/openstack/salt-formula-keystone | address: https://git.openstack.org/openstack/salt-formula-keystone | ||||
revision: refs/changes/56/123456/1 | revision: refs/changes/56/123456/1 | ||||
Salt master syndicate master of masters | |||||
Salt syndic: Master of masters | |||||
.. code-block:: yaml | .. code-block:: yaml | ||||
salt: | salt: | ||||
master: | master: | ||||
enabled: true | enabled: true | ||||
syndicate: | |||||
mode: master | |||||
order_masters: True | |||||
Salt master syndicate (client) master | |||||
Salt syndic: Lower master | |||||
.. code-block:: yaml | .. code-block:: yaml | ||||
salt: | salt: | ||||
master: | |||||
syndic: | |||||
enabled: true | enabled: true | ||||
syndicate: | |||||
mode: client | |||||
host: master-master | |||||
master: | |||||
host: master-of-master-host | |||||
timeout: 5 | |||||
Salt master with custom handlers | Salt master with custom handlers | ||||
{%- from "salt/map.jinja" import syndic with context %} | |||||
syndic_master: {{ syndic.master.host }} | |||||
syndic_wait: {{ syndic.get('timeout', '5') }} |
{%- endfor %} | {%- endfor %} | ||||
{%- if master.syndic is defined %} | |||||
{% if master.syndic.mode == 'master' %} | |||||
{%- if master.order_masters %} | |||||
order_masters: True | order_masters: True | ||||
{%- endif %} | {%- endif %} | ||||
{% if master.syndic.mode == 'client' %} | |||||
syndic_master: {{ master.syndic.host }} | |||||
{%- endif %} | |||||
{%- endif %} |
{%- endif %} | {%- endif %} | ||||
{%- load_yaml as syndic_defaults %} | |||||
Debian: | |||||
pkgs: | |||||
- salt-syndic | |||||
RedHat: | |||||
pkgs: | |||||
- salt-syndic | |||||
{%- endload %} | |||||
{%- set syndic = salt['grains.filter_by'](syndic_defaults, merge=salt['pillar.get']('salt:syndic')) %} | |||||
{%- load_yaml as minion_common %} | {%- load_yaml as minion_common %} | ||||
default: | default: | ||||
graph_pkgs: | graph_pkgs: |
{%- from "salt/map.jinja" import syndic with context %} | |||||
{%- if syndic.enabled %} | |||||
include: | |||||
- salt.master.service | |||||
salt_syndic_packages: | |||||
pkg.installed: | |||||
- names: {{ syndic.pkgs }} | |||||
/etc/salt/master.d/_syndic.conf: | |||||
file.managed: | |||||
- source: salt://salt/files/_syndic.conf | |||||
- user: root | |||||
- template: jinja | |||||
- watch_in: | |||||
- service: salt_master_service | |||||
{%- endif %} |