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

vmware_inventory: permit to skip nopermission error on host subkeys (notify user in debug mode) (#21663)

example use case: you have rights on guest but you cannot see the VMWare host

Signed-off-by: nerzhul <loic.blot@unix-experience.fr>
This commit is contained in:
Loïc Blot 2017-02-21 14:51:23 +01:00 committed by jctanner
parent 6622b05326
commit d144cf9c27

View file

@ -685,12 +685,15 @@ class VMWareInventory(object):
if self.lowerkeys:
method = method.lower()
if level + 1 <= self.maxlevel:
try:
rdata[method] = self._process_object_types(
methodToCall,
thisvm=thisvm,
inkey=inkey + '.' + method,
level=(level + 1)
)
except vim.fault.NoPermission:
self.debugl("Skipping method %s (NoPermission)" % method)
else:
pass