1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix valueerror in vmware_inventory.py (#28597)

This commit is contained in:
jctanner 2017-08-24 10:04:52 -04:00 committed by GitHub
parent 10467efaba
commit 65feaa11b2

View file

@ -745,7 +745,7 @@ class VMWareInventory(object):
return self.inventory['_meta']['hostvars'][host] return self.inventory['_meta']['hostvars'][host]
elif self.args.host and self.inventory['_meta']['hostvars']: elif self.args.host and self.inventory['_meta']['hostvars']:
match = None match = None
for k, v in self.inventory['_meta']['hostvars']: for k, v in self.inventory['_meta']['hostvars'].items():
if self.inventory['_meta']['hostvars'][k]['name'] == self.args.host: if self.inventory['_meta']['hostvars'][k]['name'] == self.args.host:
match = k match = k
break break