diff --git a/ansible/roles/haproxy/tasks/precheck.yml b/ansible/roles/haproxy/tasks/precheck.yml index 44b1f03777..c5fec9d107 100644 --- a/ansible/roles/haproxy/tasks/precheck.yml +++ b/ansible/roles/haproxy/tasks/precheck.yml @@ -179,6 +179,17 @@ - "{{ '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 }}" diff --git a/ansible/roles/mistral/tasks/precheck.yml b/ansible/roles/mistral/tasks/precheck.yml index ed97d539c0..0b6001871a 100644 --- a/ansible/roles/mistral/tasks/precheck.yml +++ b/ansible/roles/mistral/tasks/precheck.yml @@ -1 +1,16 @@ --- +- name: Get container facts + kolla_container_facts: + name: + - mistral_api + register: container_facts + +- name: Checking free port for Mistral API + wait_for: + host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}" + port: "{{ mistral_api_port }}" + connect_timeout: 1 + state: stopped + when: + - container_facts['mistral_api'] is not defined + - inventory_hostname in groups['mistral-api'] diff --git a/ansible/roles/prechecks/tasks/port_checks.yml b/ansible/roles/prechecks/tasks/port_checks.yml index 9d75af8bb3..f7b8649011 100644 --- a/ansible/roles/prechecks/tasks/port_checks.yml +++ b/ansible/roles/prechecks/tasks/port_checks.yml @@ -560,26 +560,6 @@ - enable_grafana | bool - inventory_hostname in groups['haproxy'] -- name: Checking free port for Mistral API - wait_for: - host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}" - port: "{{ mistral_api_port }}" - connect_timeout: 1 - state: stopped - when: - - enable_mistral | bool - - inventory_hostname in groups['mistral-api'] - -- 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 - - inventory_hostname in groups['haproxy'] - - name: Checking free port for Searchlight API wait_for: host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"