
Main issue with rabbitmq clusterer setup is to shut down gospel node as last one, which is bulk of this change Co-Authored-By: Sam Yaple <sam@yaple.net> Change-Id: I88e566a19ed813b0e3eef65ef7139ccfaa0c2700 Implements: blueprint upgrade-rabbitmq Partially-implements: blueprint upgrade-kolla
23 lines
704 B
YAML
23 lines
704 B
YAML
---
|
|
- include: config.yml
|
|
|
|
- name: Find gospel node
|
|
command: docker exec -t rabbitmq /usr/local/bin/rabbitmq_get_gospel_node
|
|
changed_when: "{{ (gospel_node.stdout | from_json).changed }}"
|
|
failed_when: "{{ (gospel_node.stdout | from_json).failed }}"
|
|
register: gospel_node
|
|
run_once: True
|
|
|
|
- name: Stopping non-gospel nodes
|
|
kolla_docker:
|
|
action: "stop_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "rabbitmq"
|
|
when: rabbitmq_hostname != (gospel_node.stdout | from_json).hostname
|
|
|
|
- include: start.yml
|
|
when: rabbitmq_hostname == (gospel_node.stdout | from_json).hostname
|
|
|
|
- include: start.yml
|
|
when: rabbitmq_hostname != (gospel_node.stdout | from_json).hostname
|