Properly fail precheck for internal VIP's network

When kolla_internal_vip_address didn't belong to the same network as
network_interface, the prechecks would spit out an ugly error:

  Unexpected templating type error occurred on [snip]:
  argument of type 'NoneType' is not iterable"

This commit fixes the check to execute properly.

Change-Id: I24a066c212c78e105a923525b131724736ac74b6
This commit is contained in:
Martin André 2016-06-16 16:48:39 +02:00
parent 9931fc6d9e
commit 7e00288ff0

View File

@ -461,4 +461,4 @@
register: ip_addr_output register: ip_addr_output
changed_when: false changed_when: false
failed_when: "'169.254.' not in kolla_internal_vip_address and \ failed_when: "'169.254.' not in kolla_internal_vip_address and \
'False' in kolla_internal_vip_address | ipaddr(ip_addr_output.stdout.split()[3])" kolla_internal_vip_address | ipaddr(ip_addr_output.stdout.split()[3]) is none"