Description
SUMMARY
I have the following virtual machine structure:
└───Project
├───aaa1
├───aaa111
│ test1
└───aaa1111
And when I want to create a virtual machine with name test1 in the aaa1 folder, I get the following problem:
The virtual machine is created (customized) in the aaa111 folder, instead of the aaa1 folder.
Another problem:
When I try to delete the test1 machine from the aaa1 folder, I will delete it from the aaa111 folder.
ISSUE TYPE
- Bug Report
COMPONENT NAME
community.vmware.vmware_guest
ansible-collections/community.vmware/blob/main/plugins/module/vmware_guest.py
ANSIBLE VERSION
4.5.0
COLLECTION VERSION
1.12.0
ADDITIONAL INFORMATION
I guess the problem lies in the function of getting the virtual machine.
community\vmware\plugins\module_utils\vmware.py
The main problem is that user_desired_path lies entirely in actual_vm_folder_path:
user_desired_path = 'Project / aaa1'
actual_vm_folder_path = 'Project / aaa11'