mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-21 16:39:08 -07:00
VMware: Check return of FindByInventoryPath (#55282)
Check return value of FindByInventoryPath API which is used for finding desired folder to deploy OVF. Fixes: #54823 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
f247c21d23
commit
ffce456de9
2 changed files with 4 additions and 0 deletions
|
@ -370,6 +370,8 @@ class VMwareDeployOvf:
|
|||
|
||||
if self.params['folder']:
|
||||
folder = self.si.searchIndex.FindByInventoryPath(self.params['folder'])
|
||||
if not folder:
|
||||
self.module.fail_json(msg="Unable to find the specified folder %(folder)s" % self.params)
|
||||
else:
|
||||
folder = datacenter.vmFolder
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue