eb4313ca49
Depends-On: I0773851b61d341117ab214382856a9036aca51bb Change-Id: I060e21ada928577e833de2782be5ea570be32730 Partially-implements: blueprint condition-pre-check
38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
---
|
|
- name: Get container facts
|
|
kolla_container_facts:
|
|
name: haproxy
|
|
register: container_facts
|
|
|
|
- name: Getting haproxy stat
|
|
shell: echo "show stat" | docker exec -i haproxy socat unix-connect:/var/lib/kolla/haproxy/haproxy.sock stdio
|
|
register: haproxy_stat_shell
|
|
changed_when: false
|
|
failed_when: false
|
|
when: container_facts['haproxy'] is defined
|
|
|
|
- set_fact:
|
|
haproxy_stat: "{{ haproxy_stat_shell.stdout|default('') }}"
|
|
|
|
- name: Checking free port for Glance API HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ glance_api_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when:
|
|
- enable_glance | bool
|
|
- inventory_hostname in groups['haproxy']
|
|
- "{{ 'glance_api' not in haproxy_stat }}"
|
|
|
|
- name: Checking free port for Glance Registry HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ glance_registry_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when:
|
|
- enable_glance | bool
|
|
- inventory_hostname in groups['haproxy']
|
|
- "{{ 'glance_registry' not in haproxy_stat }}"
|