b51eeed89e
include is marked as deprecated since ansible 2.4[0] [0] https://docs.ansible.com/ansible/2.4/include_module.html#deprecated Co-Authored-By: confi-surya <singh.surya64mnnit@gmail.com> Change-Id: Ic9d71e1865d1c728890625aeddf424a5734c0a8a
23 lines
732 B
YAML
23 lines
732 B
YAML
---
|
|
- include_tasks: config.yml
|
|
|
|
- set_fact: secondary_addresses={{ hostvars[inventory_hostname]['ansible_' + api_interface].get('ipv4_secondaries', []) | map(attribute='address') | list }}
|
|
|
|
- name: Stopping all slave keepalived containers
|
|
become: true
|
|
kolla_docker:
|
|
action: "stop_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "keepalived"
|
|
when: kolla_internal_vip_address not in secondary_addresses
|
|
|
|
# Upgrading master keepalived and haproxy
|
|
- name: Flush handlers
|
|
meta: flush_handlers
|
|
when: kolla_internal_vip_address in secondary_addresses
|
|
|
|
# Upgrading slave keepalived and haproxy
|
|
- name: Flush handlers
|
|
meta: flush_handlers
|
|
when: kolla_internal_vip_address not in secondary_addresses
|