Automating VMware vSphere resources using Ansible
We will start with some simple automation use cases for VMware, such as provisioning of virtual machines, managing high availability (HA), network creation, and managing snapshots. The Ansible VMware collection (community.vmware
) contains around 150 modules and other plugins:
Figure 7.6 – Ansible VMware collection by the community
The community.vmware
collection relies on the pyvmomi
and vSphere Automation SDK for Python libraries. Hence, to use the community.vmware
collection, you need to install appropriate packages for Ansible to use it.
VMware has already introduced the vSphere REST API for vSphere 6.0 and later. A new Ansible collection was introduced (vmware.vmware_rest
) to manage the operations using a REST API instead of Python libraries and SDKs. vmware.vmware_rest
contains around 130 modules and other plugins:
Figure 7.7 – Ansible VMware REST API collection by...