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