72f2945c10
Hardcoded docker value in commands is not supported anymore and kolla_container_engine is used instead. Change-Id: I25d9563c82842ac51d41467ff7b4144b306fdb12 Signed-off-by: Ivan Halomi <i.halomi@partner.samsung.com>
30 lines
993 B
YAML
30 lines
993 B
YAML
---
|
|
- block:
|
|
- name: Get container facts
|
|
become: true
|
|
kolla_container_facts:
|
|
container_engine: "{{ kolla_container_engine }}"
|
|
name:
|
|
- "{{ service.container_name }}"
|
|
register: container_facts
|
|
|
|
- block:
|
|
- name: List RabbitMQ policies
|
|
become: true
|
|
command: "{{ kolla_container_engine }} exec {{ service.container_name }} rabbitmqctl list_policies --silent"
|
|
register: rabbitmq_policies
|
|
changed_when: false
|
|
|
|
- name: Remove ha-all policy from RabbitMQ
|
|
become: true
|
|
command: "{{ kolla_container_engine }} exec {{ service.container_name }} rabbitmqctl clear_policy ha-all"
|
|
when:
|
|
- "'ha-all' in rabbitmq_policies.stdout"
|
|
when: container_facts[service.container_name] is defined
|
|
|
|
delegate_to: "{{ groups[role_rabbitmq_groups] | first }}"
|
|
run_once: true
|
|
vars:
|
|
service_name: "rabbitmq"
|
|
service: "{{ rabbitmq_services[service_name] }}"
|