Skip to content

Commit 28284c2

Browse files
Akasurdegundalow
authored andcommitted
VMware: debug property values (ansible#45410)
This fix adds additional information about VM properties Fixes: ansible#43618 Signed-off-by: Abhijeet Kasurde <[email protected]>
1 parent e0de42f commit 28284c2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

contrib/inventory/vmware_inventory.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,14 @@ def facts_from_proplist(self, vm):
614614
lastref = lastref[x]
615615
else:
616616
lastref[x] = val
617-
617+
if self.args.debug:
618+
self.debugl("For %s" % vm.name)
619+
for key in list(rdata.keys()):
620+
if isinstance(rdata[key], dict):
621+
for ikey in list(rdata[key].keys()):
622+
self.debugl("Property '%s.%s' has value '%s'" % (key, ikey, rdata[key][ikey]))
623+
else:
624+
self.debugl("Property '%s' has value '%s'" % (key, rdata[key]))
618625
return rdata
619626

620627
def facts_from_vobj(self, vobj, level=0):

0 commit comments

Comments
 (0)