b163cb02d1
Depends-On: I75e00312b36e1678b90a42cf58d24652323eff27 Change-Id: Ia716fabffca41eff816e59bbf9f4cab79ee8b72f
43 lines
1.4 KiB
YAML
43 lines
1.4 KiB
YAML
---
|
|
# NOTE(pbourke): These tasks perform a 'full stop upgrade', which is necessary when moving between
|
|
# major releases. In future kolla-ansible releases we may be able to change this to a rolling
|
|
# restart. For info on this process see https://www.rabbitmq.com/upgrade.html
|
|
- name: Checking if rabbitmq container needs upgrading
|
|
vars:
|
|
service_name: "rabbitmq"
|
|
service: "{{ rabbitmq_services[service_name] }}"
|
|
become: true
|
|
kolla_docker:
|
|
action: "compare_image"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ project_name }}"
|
|
image: "{{ rabbitmq_image_full }}"
|
|
environment: "{{ service.environment }}"
|
|
when: inventory_hostname in groups[role_rabbitmq_groups]
|
|
register: rabbitmq_differs
|
|
|
|
- include_tasks: config.yml
|
|
|
|
- name: Stopping all rabbitmq instances but the first node
|
|
become: true
|
|
kolla_docker:
|
|
action: "stop_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ project_name }}"
|
|
when:
|
|
- inventory_hostname != groups[role_rabbitmq_groups]|first
|
|
- rabbitmq_differs['result']
|
|
|
|
- name: Stopping rabbitmq on the first node
|
|
become: true
|
|
kolla_docker:
|
|
action: "stop_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ project_name }}"
|
|
when:
|
|
- inventory_hostname == groups[role_rabbitmq_groups]|first
|
|
- rabbitmq_differs['result']
|
|
|
|
- name: Flush handlers
|
|
meta: flush_handlers
|