diff --git a/ansible/roles/haproxy/tasks/precheck.yml b/ansible/roles/haproxy/tasks/precheck.yml index 9472c06ff16d99d2cd9517a59fe8deaf0a5d49b9..24873493bc81723b192c163dca0626d2504fb7a4 100644 --- a/ansible/roles/haproxy/tasks/precheck.yml +++ b/ansible/roles/haproxy/tasks/precheck.yml @@ -157,6 +157,17 @@ - "{{ '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 }}" diff --git a/ansible/roles/prechecks/tasks/port_checks.yml b/ansible/roles/prechecks/tasks/port_checks.yml index 3a7d784162b603bb43cca5524c103a9aad89012b..9779fa6441dddcf5a5ef16e68c0e9be350ad23ad 100644 --- a/ansible/roles/prechecks/tasks/port_checks.yml +++ b/ansible/roles/prechecks/tasks/port_checks.yml @@ -640,26 +640,6 @@ - enable_grafana | bool - inventory_hostname in groups['haproxy'] -- name: Checking free port for Senlin API - wait_for: - host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}" - port: "{{ senlin_api_port }}" - connect_timeout: 1 - state: stopped - when: - - enable_senlin | bool - - inventory_hostname in groups['senlin-api'] - -- 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 - - inventory_hostname in groups['haproxy'] - - name: Checking free port for Mistral API wait_for: host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}" diff --git a/ansible/roles/senlin/tasks/precheck.yml b/ansible/roles/senlin/tasks/precheck.yml index ed97d539c095cf1413af30cc23dea272095b97dd..b62943621b53ed41b14d92feb67eb090966803c5 100644 --- a/ansible/roles/senlin/tasks/precheck.yml +++ b/ansible/roles/senlin/tasks/precheck.yml @@ -1 +1,16 @@ --- +- name: Get container facts + kolla_container_facts: + name: + - senlin_api + register: container_facts + +- name: Checking free port for Senlin API + wait_for: + host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}" + port: "{{ senlin_api_port }}" + connect_timeout: 1 + state: stopped + when: + - container_facts['senlin_api'] is not defined + - inventory_hostname in groups['senlin-api']