mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
cloudstack: cs_instance: fix ip address may not be set on default nic
This commit is contained in:
parent
2d9d474f23
commit
6f91273fe1
1 changed files with 1 additions and 1 deletions
|
@ -779,7 +779,7 @@ class AnsibleCloudStackInstance(AnsibleCloudStack):
|
||||||
self.result['affinity_groups'] = affinity_groups
|
self.result['affinity_groups'] = affinity_groups
|
||||||
if 'nic' in instance:
|
if 'nic' in instance:
|
||||||
for nic in instance['nic']:
|
for nic in instance['nic']:
|
||||||
if nic['isdefault']:
|
if nic['isdefault'] and 'ipaddress' in nic:
|
||||||
self.result['default_ip'] = nic['ipaddress']
|
self.result['default_ip'] = nic['ipaddress']
|
||||||
return self.result
|
return self.result
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue