Here is an example of the errors you get when using it:
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: module 'ssl' has no attribute 'wrap_socket'
fatal: [svnipap-0009 -> localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):
File \"/root/.ansible/tmp/ansible-tmp-1715850077.213712-12628-91429943003605/AnsiballZ_vmware_guest_find.py\", line 107, in <module>
_ansiballz_main()
File \"/root/.ansible/tmp/ansible-tmp-1715850077.213712-12628-91429943003605/AnsiballZ_vmware_guest_find.py\", line 99, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File \"/root/.ansible/tmp/ansible-tmp-1715850077.213712-12628-91429943003605/AnsiballZ_vmware_guest_find.py\", line 47, in invoke_module
runpy.run_module(mod_name='ansible_collections.community.vmware.plugins.modules.vmware_guest_find', init_globals=dict(_module_fqn='ansible_collections.community.vmware.plugins.modules.vmware_guest_find', _modlib_path=modlib_path),
File \"<frozen runpy>\", line 226, in run_module
File \"<frozen runpy>\", line 98, in _run_module_code
File \"<frozen runpy>\", line 88, in _run_code
File \"/tmp/ansible_vmware_guest_find_payload_co4dlvzj/ansible_vmware_guest_find_payload.zip/ansible_collections/community/vmware/plugins/modules/vmware_guest_find.py\", line 74, in <module>
File \"/tmp/ansible_vmware_guest_find_payload_co4dlvzj/ansible_vmware_guest_find_payload.zip/ansible_collections/community/vmware/plugins/module_utils/vmware.py\", line 39, in <module>
File \"/usr/lib/python3/dist-packages/pyVim/connect.py\", line 37, in <module>
from pyVmomi import vim, vmodl, SoapStubAdapter, SessionOrientedStub
File \"/usr/lib/python3/dist-packages/pyVmomi/__init__.py\", line 204, in <module>
from pyVmomi.SoapAdapter import SoapStubAdapter, StubAdapterBase, SoapCmdStubAdapter, \\
File \"/usr/lib/python3/dist-packages/pyVmomi/SoapAdapter.py\", line 993, in <module>
_SocketWrapper = ssl.wrap_socket ^^^^^^^^^^^^^^^
AttributeError: module 'ssl' has no attribute 'wrap_socket'
", "module_stdout": "", "msg": "MODULE FAILURE
See stdout/stderr for the exact error", "rc": 1}
pyVmomi is not working with python 3.12 that ships with 24.04.
There is a commit in the official GIT repo to fix this. https:/ /github. com/vmware/ pyvmomi/ commit/ 44d7b9f0c201a92 018bac8324542c0 adf96aa148
Here is an example of the errors you get when using it: .ansible/ tmp/ansible- tmp-1715850077. 213712- 12628-914299430 03605/AnsiballZ _vmware_ guest_find. py\", line 107, in <module> main() .ansible/ tmp/ansible- tmp-1715850077. 213712- 12628-914299430 03605/AnsiballZ _vmware_ guest_find. py\", line 99, in _ansiballz_main module( zipped_ mod, temp_path, ANSIBALLZ_PARAMS) .ansible/ tmp/ansible- tmp-1715850077. 213712- 12628-914299430 03605/AnsiballZ _vmware_ guest_find. py\", line 47, in invoke_module run_module( mod_name= 'ansible_ collections. community. vmware. plugins. modules. vmware_ guest_find' , init_globals= dict(_module_ fqn='ansible_ collections. community. vmware. plugins. modules. vmware_ guest_find' , _modlib_ path=modlib_ path), ansible_ vmware_ guest_find_ payload_ co4dlvzj/ ansible_ vmware_ guest_find_ payload. zip/ansible_ collections/ community/ vmware/ plugins/ modules/ vmware_ guest_find. py\", line 74, in <module> ansible_ vmware_ guest_find_ payload_ co4dlvzj/ ansible_ vmware_ guest_find_ payload. zip/ansible_ collections/ community/ vmware/ plugins/ module_ utils/vmware. py\", line 39, in <module> lib/python3/ dist-packages/ pyVim/connect. py\", line 37, in <module> lib/python3/ dist-packages/ pyVmomi/ __init_ _.py\", line 204, in <module> lib/python3/ dist-packages/ pyVmomi/ SoapAdapter. py\", line 993, in <module>
^^^^^^^ ^^^^^^^ ^
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: module 'ssl' has no attribute 'wrap_socket'
fatal: [svnipap-0009 -> localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):
File \"/root/
_ansiballz_
File \"/root/
invoke_
File \"/root/
runpy.
File \"<frozen runpy>\", line 226, in run_module
File \"<frozen runpy>\", line 98, in _run_module_code
File \"<frozen runpy>\", line 88, in _run_code
File \"/tmp/
File \"/tmp/
File \"/usr/
from pyVmomi import vim, vmodl, SoapStubAdapter, SessionOrientedStub
File \"/usr/
from pyVmomi.SoapAdapter import SoapStubAdapter, StubAdapterBase, SoapCmdStubAdapter, \\
File \"/usr/
_SocketWrapper = ssl.wrap_socket
AttributeError: module 'ssl' has no attribute 'wrap_socket'
", "module_stdout": "", "msg": "MODULE FAILURE
See stdout/stderr for the exact error", "rc": 1}