diff --git a/ansible/roles/haproxy/tasks/precheck.yml b/ansible/roles/haproxy/tasks/precheck.yml index e8c9c12ac7..50e252a32f 100644 --- a/ansible/roles/haproxy/tasks/precheck.yml +++ b/ansible/roles/haproxy/tasks/precheck.yml @@ -34,6 +34,18 @@ changed_when: False always_run: True +- name: Checking the kolla_external_vip_interface is present + fail: "msg='Please check the kolla_external_vip_interface property - interface {{ kolla_external_vip_interface }} not found'" + when: + - haproxy_enable_external_vip | bool + - kolla_external_vip_interface not in ansible_interfaces + +- name: Checking the kolla_external_vip_interface is active + fail: "msg='Please check the kolla_external_vip_interface settings - interface {{ kolla_external_vip_interface }} is not active'" + when: + - haproxy_enable_external_vip | bool + - hostvars[inventory_hostname]['ansible_' + kolla_external_vip_interface]['active'] != True + - name: Checking if kolla_internal_vip_address and kolla_external_vip_address are not pingable from any node command: ping -c 3 {{ item }} register: ping_output