Ansible provides various modules to manage VMware infrastructure, which includes datacenter, cluster, host system and virtual machine.
Ansible VMware modules are written on top of pyVmomi. pyVmomi is the Python SDK for the VMware vSphere API that allows user to manage ESX, ESXi, and vCenter infrastructure. You can install pyVmomi using pip:
$ pip install pyvmomi
The vmware_guest module manages various operations related to virtual machines in the given ESXi or vCenter server.