mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
VMware: Add debug details for error (#33337)
This fix adds debugging details for 'no folder found' error. This will allow to debug the user's setup easily. Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
717193b67f
commit
bb3991218e
1 changed files with 10 additions and 1 deletions
|
@ -1293,7 +1293,16 @@ class PyVmomiHelper(PyVmomi):
|
|||
|
||||
# abort if no strategy was successful
|
||||
if f_obj is None:
|
||||
self.module.fail_json(msg='No folder matched the path: %(folder)s' % self.params)
|
||||
# Add some debugging values in failure.
|
||||
details = {
|
||||
'datacenter': datacenter.name,
|
||||
'datacenter_path': dcpath,
|
||||
'folder': self.params['folder'],
|
||||
'full_search_path': fullpath,
|
||||
}
|
||||
self.module.fail_json(msg='No folder %s matched in the search path : %s' % (self.params['folder'], fullpath),
|
||||
details=details)
|
||||
|
||||
destfolder = f_obj
|
||||
|
||||
if self.params['template']:
|
||||
|
|
Loading…
Reference in a new issue