Merge "rabbitmq: follow up for classic queue mirror removal"

This commit is contained in:
Zuul 2022-03-31 15:21:51 +00:00 committed by Gerrit Code Review
commit 3f5d77af61

View File

@ -22,7 +22,7 @@
service: "{{ rabbitmq_services[service_name] }}"
become: true
command: "docker exec {{ service.container_name }} rabbitmqctl list_policies --silent"
when: inventory_hostname in groups[role_rabbitmq_groups]
delegate_to: "{{ groups[role_rabbitmq_groups] | first }}"
run_once: true
register: rabbitmq_policies
changed_when: false
@ -34,8 +34,9 @@
service: "{{ rabbitmq_services[service_name] }}"
become: true
command: "docker exec {{ service.container_name }} rabbitmqctl clear_policy ha-all"
delegate_to: "{{ groups[role_rabbitmq_groups] | first }}"
when:
- inventory_hostname in groups[role_rabbitmq_groups] and 'ha-all' in rabbitmq_policies.stdout
- "'ha-all' in rabbitmq_policies.stdout"
run_once: true
- import_tasks: config.yml