diff --git a/lib/ansible/modules/extras/cloud/misc/virt.py b/lib/ansible/modules/extras/cloud/misc/virt.py index b59c7ed3de3..65791e43e9f 100644 --- a/lib/ansible/modules/extras/cloud/misc/virt.py +++ b/lib/ansible/modules/extras/cloud/misc/virt.py @@ -128,6 +128,9 @@ class LibvirtConnection(object): if "xen" in stdout: conn = libvirt.open(None) + elif "esx" in uri: + auth = [[libvirt.VIR_CRED_AUTHNAME, libvirt.VIR_CRED_NOECHOPROMPT], [], None] + conn = libvirt.openAuth(uri, auth) else: conn = libvirt.open(uri)