258 lines
7.2 KiB
YAML
258 lines
7.2 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 Aodh API HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ aodh_api_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when:
|
|
- enable_aodh | bool
|
|
- "{{ 'aodh_api' not in haproxy_stat }}"
|
|
- inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Barbican API HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ barbican_api_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when:
|
|
- enable_barbican | bool
|
|
- "{{ 'barbican_api' not in haproxy_stat }}"
|
|
- inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Ceilometer API HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ ceilometer_api_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when:
|
|
- enable_ceilometer | bool
|
|
- "{{ 'ceilometer_api' not in haproxy_stat }}"
|
|
- inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Cinder API HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ cinder_api_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when:
|
|
- enable_cinder | bool
|
|
- "{{ 'cinder_api' not in haproxy_stat }}"
|
|
- inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Cloudkitty API HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ cloudkitty_api_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when:
|
|
- enable_cloudkitty | bool
|
|
- "{{ 'cloudkitty_api' not in haproxy_stat }}"
|
|
- inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Congress API HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ congress_api_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when:
|
|
- enable_congress | bool
|
|
- "{{ 'congress_api' not in haproxy_stat }}"
|
|
- inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Designate API HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ designate_api_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when:
|
|
- enable_designate | bool
|
|
- inventory_hostname in groups['haproxy']
|
|
- "{{ 'designate_api' not in haproxy_stat }}"
|
|
|
|
- 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 }}"
|
|
|
|
- name: Checking free port for Gnocchi API HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ gnocchi_api_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when:
|
|
- enable_gnocchi | bool
|
|
- "{{ 'gnocchi_api' not in haproxy_stat }}"
|
|
- inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Heat API HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ heat_api_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when:
|
|
- enable_heat | bool
|
|
- "{{ 'heat_api' not in haproxy_stat }}"
|
|
- inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Heat API CFN HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ heat_api_cfn_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when:
|
|
- enable_heat | bool
|
|
- "{{ 'heat_api_cfn' not in haproxy_stat }}"
|
|
- inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Horizon HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ horizon_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when:
|
|
- enable_horizon | bool
|
|
- "{{ 'horizon' not in haproxy_stat }}"
|
|
- inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Ironic HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ ironic_api_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when:
|
|
- enable_ironic | bool
|
|
- "{{ 'ironic_api' not in haproxy_stat }}"
|
|
- inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Manila API HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ manila_api_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when:
|
|
- enable_manila | bool
|
|
- "{{ 'manila_api' not in haproxy_stat }}"
|
|
- inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Mistral API HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ mistral_api_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when:
|
|
- enable_mistral | bool
|
|
- "{{ 'mistral_api' not in haproxy_stat }}"
|
|
- inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Neutron Server HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ neutron_server_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when:
|
|
- enable_neutron | bool
|
|
- "{{ 'neutron_server' not in haproxy_stat }}"
|
|
- inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Sahara API HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ sahara_api_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when:
|
|
- enable_sahara | bool
|
|
- "{{ 'sahara_api' not in haproxy_stat }}"
|
|
- inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Senlin API HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ senlin_api_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when:
|
|
- enable_senlin | bool
|
|
- "{{ 'senlin_api' not in haproxy_stat }}"
|
|
- inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Tacker Server HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ tacker_server_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when:
|
|
- enable_tacker | bool
|
|
- "{{ 'tacker_server' not in haproxy_stat }}"
|
|
- inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Trove API HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ trove_api_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when:
|
|
- enable_trove | bool
|
|
- "{{ 'trove_api' not in haproxy_stat }}"
|
|
- inventory_hostname in groups['haproxy']
|
|
|
|
- name: Checking free port for Watcher API HAProxy
|
|
wait_for:
|
|
host: "{{ kolla_internal_vip_address }}"
|
|
port: "{{ watcher_api_port }}"
|
|
connect_timeout: 1
|
|
state: stopped
|
|
when:
|
|
- enable_watcher | bool
|
|
- "{{ 'watcher_api' not in haproxy_stat }}"
|
|
- inventory_hostname in groups['haproxy']
|