From ce3c8fd7aed5db82d348fbf735d768b702f0e1ca Mon Sep 17 00:00:00 2001 From: Eduardo Gonzalez Date: Tue, 16 May 2017 12:52:40 +0200 Subject: [PATCH] Add external_vip_interface precheck At this moment prechecks pass even external_vip_interface is not present or active. This change adds such precheck into haproxy role. Change-Id: I7a5ac4aca7002ff8376710ab536b975c88edebc6 Closes-Bug: #1668489 --- ansible/roles/haproxy/tasks/precheck.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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