cloudstack: cs_instance: fix ip address may not be set on default nic

reviewable/pr18780/r1
Rene Moser 9 years ago
parent 7a0bfd91bb
commit 249b7bf969

@ -779,7 +779,7 @@ class AnsibleCloudStackInstance(AnsibleCloudStack):
self.result['affinity_groups'] = affinity_groups
if 'nic' in instance:
for nic in instance['nic']:
if nic['isdefault']:
if nic['isdefault'] and 'ipaddress' in nic:
self.result['default_ip'] = nic['ipaddress']
return self.result

Loading…
Cancel
Save