diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index b126f3ba21..75b0c3bf80 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -203,7 +203,6 @@ horizon_port: "80" murano_api_port: "8082" ironic_api_port: "6385" - ironic_inspector_port: "5050" magnum_api_port: "9511" diff --git a/ansible/roles/haproxy/tasks/precheck.yml b/ansible/roles/haproxy/tasks/precheck.yml index 33b375b7d1..ea8b6e49ab 100644 --- a/ansible/roles/haproxy/tasks/precheck.yml +++ b/ansible/roles/haproxy/tasks/precheck.yml @@ -201,6 +201,17 @@ - inventory_hostname in groups['haproxy'] - "{{ 'ironic_api' not in haproxy_stat }}" +- name: Checking free port for Ironic Inspector HAProxy + wait_for: + host: "{{ kolla_internal_vip_address }}" + port: "{{ ironic_inspector_port }}" + connect_timeout: 1 + state: stopped + when: + - enable_ironic | bool + - inventory_hostname in groups['haproxy'] + - "{{ 'ironic_inspector' not in haproxy_stat }}" + - name: Checking free port for Karbor Admin HAProxy wait_for: host: "{{ kolla_internal_vip_address }}" diff --git a/ansible/roles/ironic/tasks/precheck.yml b/ansible/roles/ironic/tasks/precheck.yml index d753671a32..0289b5ec3c 100644 --- a/ansible/roles/ironic/tasks/precheck.yml +++ b/ansible/roles/ironic/tasks/precheck.yml @@ -3,6 +3,7 @@ kolla_container_facts: name: - ironic_api + - ironic_inspector register: container_facts - name: Checking free port for Ironic @@ -15,6 +16,16 @@ - container_facts['ironic_api'] is not defined - inventory_hostname in groups['ironic-api'] +- name: Checking free port for Ironic Inspector + wait_for: + host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}" + port: "{{ ironic_inspector_port }}" + connect_timeout: 1 + state: stopped + when: + - container_facts['ironic_inspector'] is not defined + - inventory_hostname in groups['ironic-inspector'] + - name: Checking ironic-agent files exist for Ironic local_action: stat path="{{ node_custom_config }}/ironic/{{ item }}" register: result