Merge "Add global HA policy for rabbitmq"

This commit is contained in:
Zuul 2019-04-16 18:45:25 +00:00 committed by Gerrit Code Review
commit dc5729ad6f
3 changed files with 16 additions and 0 deletions

View File

@ -24,6 +24,11 @@ rabbitmq_servers: >-
| map('extract', hostvars, 'ansible_host')
| list | join(',')
}}
rabbitmq_policies:
- name: "HA"
pattern: '^(?!(amq\.)|(.*_fanout_)|(reply_)).*'
priority: 0
tags: "ha-mode=all"
## Galera options
galera_client_package_state: "{{ package_state }}"

View File

@ -19,6 +19,7 @@ oslomsg_rpc_port: "{{ (groups[qdrouterd_host_group] | length > 0) | ternary(qdro
oslomsg_rpc_servers: "{{ (groups[qdrouterd_host_group] | length > 0) | ternary(qdrouterd_servers, rabbitmq_servers) }}"
oslomsg_rpc_use_ssl: "{{ (groups[qdrouterd_host_group] | length > 0) | ternary(qdrouterd_use_ssl, rabbitmq_use_ssl) }}"
oslomsg_rpc_host_group: "{{ (groups[qdrouterd_host_group] | length > 0) | ternary(qdrouterd_host_group, rabbitmq_host_group) }}"
oslomsg_rpc_policies: "{{ rabbitmq_policies }}"
# Notify
oslomsg_notify_transport: "{{ (groups[rabbitmq_host_group] | length > 0) | ternary('rabbit', 'none') }}"
@ -26,3 +27,4 @@ oslomsg_notify_port: "{{ rabbitmq_port }}"
oslomsg_notify_servers: "{{ rabbitmq_servers }}"
oslomsg_notify_use_ssl: "{{ rabbitmq_use_ssl }}"
oslomsg_notify_host_group: "{{ rabbitmq_host_group }}"
oslomsg_notify_policies: "{{ rabbitmq_policies }}"

View File

@ -0,0 +1,9 @@
---
features:
- |
Added 2 new varibles for all groups - `oslomsg_notify_policies` and
`oslomsg_rpc_policies`. These variables contain default rabbitmq
policies, which will be applied for every rabbitmq vhost. As for now they
will enable [HA mode](https://www.rabbitmq.com/ha.html) for all vhosts.
If you would like to disable HA mode just set these variables to empty
lists inside your `user_config.yml`