summaryrefslogtreecommitdiffstats
path: root/ansible_collections/community/general/plugins/inventory
diff options
context:
space:
mode:
Diffstat (limited to 'ansible_collections/community/general/plugins/inventory')
-rw-r--r--ansible_collections/community/general/plugins/inventory/opennebula.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ansible_collections/community/general/plugins/inventory/opennebula.py b/ansible_collections/community/general/plugins/inventory/opennebula.py
index b097307c3..bf81758ef 100644
--- a/ansible_collections/community/general/plugins/inventory/opennebula.py
+++ b/ansible_collections/community/general/plugins/inventory/opennebula.py
@@ -143,7 +143,8 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
nic = [nic]
for net in nic:
- return net['IP']
+ if net.get('IP'):
+ return net['IP']
return False