kolla-ansible/ansible/rabbitmq.yml
Matt Crees 223556e4e2 RMQ: enable all stable feature flags at once
Also enable these after an upgrade.

Partial-Bug: #2058512
Change-Id: Ib9bdae2e25c2b6cce30e4c8024015ab5875bc1ff
2024-05-13 13:26:10 +01:00

71 lines
2.2 KiB
YAML

---
# For RabbitMQ we need to be careful about restarting services, to avoid losing quorum.
- name: Apply role rabbitmq
gather_facts: false
hosts:
- rabbitmq
- '&enable_rabbitmq_True'
max_fail_percentage: >-
{{ rabbitmq_max_fail_percentage |
default(kolla_max_fail_percentage) |
default(100) }}
tags:
- rabbitmq
tasks:
- import_role:
name: rabbitmq
vars:
role_rabbitmq_cluster_cookie: '{{ rabbitmq_cluster_cookie }}'
role_rabbitmq_cluster_port: '{{ rabbitmq_cluster_port }}'
role_rabbitmq_epmd_port: '{{ rabbitmq_epmd_port }}'
role_rabbitmq_groups: rabbitmq
role_rabbitmq_management_port: '{{ rabbitmq_management_port }}'
role_rabbitmq_monitoring_password: '{{ rabbitmq_monitoring_password }}'
role_rabbitmq_monitoring_user: '{{ rabbitmq_monitoring_user }}'
role_rabbitmq_password: '{{ rabbitmq_password }}'
role_rabbitmq_port: '{{ rabbitmq_port }}'
role_rabbitmq_prometheus_port: '{{ rabbitmq_prometheus_port }}'
role_rabbitmq_user: '{{ rabbitmq_user }}'
- name: Restart rabbitmq services
gather_facts: false
hosts:
- rabbitmq_restart
- '&enable_rabbitmq_True'
# Restart in batches
serial: "33%"
max_fail_percentage: >-
{{ rabbitmq_max_fail_percentage |
default(kolla_max_fail_percentage) |
default(100) }}
tags:
- rabbitmq
tasks:
- import_role:
name: rabbitmq
tasks_from: restart_services.yml
vars:
role_rabbitmq_cluster_cookie: '{{ rabbitmq_cluster_cookie }}'
role_rabbitmq_groups: rabbitmq
- name: Apply rabbitmq post-configuration
gather_facts: false
hosts:
- rabbitmq
- '&enable_rabbitmq_True'
max_fail_percentage: >-
{{ rabbitmq_max_fail_percentage |
default(kolla_max_fail_percentage) |
default(100) }}
tags:
- rabbitmq
tasks:
- name: Include rabbitmq post-deploy.yml
include_role:
name: rabbitmq
tasks_from: post-deploy.yml
when: kolla_action in ['deploy', 'reconfigure', 'upgrade']
vars:
role_rabbitmq_cluster_cookie: '{{ rabbitmq_cluster_cookie }}'
role_rabbitmq_groups: rabbitmq