aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames McCarthy <james.m.mccarthy@oracle.com>2016-10-14 09:52:47 +0100
committerJames McCarthy <james.m.mccarthy@oracle.com>2016-10-14 10:04:50 +0100
commit64e6e58627c2e5d7a3190a0ee35034b07a0b5d38 (patch)
tree1ffe6d0f5b6081063b43e9194100ff159fc57184
parentdbf05f076fb2394439afcee95de3922a83f92219 (diff)
downloadkolla-64e6e58627c2e5d7a3190a0ee35034b07a0b5d38.tar.gz
kolla-64e6e58627c2e5d7a3190a0ee35034b07a0b5d38.zip
Reorder the interface/network checks.
Perform the interface specific checks first, then do the network related checks (not the other way around) TrivialFix Change-Id: Iae2c9fb9491060f1e33f067c08d22479108c3c98
-rw-r--r--ansible/roles/prechecks/tasks/port_checks.yml32
1 files changed, 16 insertions, 16 deletions
diff --git a/ansible/roles/prechecks/tasks/port_checks.yml b/ansible/roles/prechecks/tasks/port_checks.yml
index f58fdfc73..46baaabd9 100644
--- a/ansible/roles/prechecks/tasks/port_checks.yml
+++ b/ansible/roles/prechecks/tasks/port_checks.yml
@@ -633,6 +633,22 @@
state: stopped
when: inventory_hostname in groups['haproxy']
+- name: Checking the network_interface is present
+ fail: "msg='Please check the network_interface property - interface {{ network_interface }} not found'"
+ when: network_interface not in ansible_interfaces
+
+- name: Checking the network_interface is active
+ fail: "msg='Please check the network_interface settings - interface {{ network_interface }} is not active'"
+ when: hostvars[inventory_hostname]['ansible_' + network_interface]['active'] != True
+
+- name: Checking the network_interface configuration
+ fail: "msg='Please check the network_interface settings - interface {{ network_interface }} configuration missing'"
+ when: hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4'] is not defined
+
+- name: Checking the network_interface ip address configuration
+ fail: "msg='Please check the network_interface settings - interface {{ network_interface }} ip address problem'"
+ when: hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] is not defined
+
- 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
@@ -650,19 +666,3 @@
failed_when: "'169.254.' not in kolla_internal_vip_address and \
kolla_internal_vip_address | ipaddr(ip_addr_output.stdout.split()[3]) is none"
when: enable_haproxy | bool
-
-- name: Checking the network_interface is present
- fail: "msg='Please check the network_interface property - interface {{ network_interface }} not found'"
- when: network_interface not in ansible_interfaces
-
-- name: Checking the network_interface is active
- fail: "msg='Please check the network_interface settings - interface {{ network_interface }} is not active'"
- when: hostvars[inventory_hostname]['ansible_' + network_interface]['active'] != True
-
-- name: Checking the network_interface configuration
- fail: "msg='Please check the network_interface settings - interface {{ network_interface }} configuration missing'"
- when: hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4'] is not defined
-
-- name: Checking the network_interface ip address configuration
- fail: "msg='Please check the network_interface settings - interface {{ network_interface }} ip address problem'"
- when: hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] is not defined