Ansible has made managing virtualized and on cloud infrastructures very easy. It has over 300 modules that run several APIs designed to cover a variety of cloud providers, such as Amazon Web Services, Google Cloud Platform, OpenStack, Microsoft Azure, Digital Ocean, and Linode. These modules manage multiple aspects of the environment, including the hosts' operating systems, network connectivity, compute resources, and hosts provisioning.
Note
When using Ansible modules with a cloud or virtual environment, it is recommended that you use a dynamic inventory for better management.
Ansible offers a list of modules to enable VMware infrastructure automated management.
We need to have the pyVmomi
Python SDK installed:
pip install pyvmomi
These modules are built to manage the VMware ESX, ESXi, and vCenter server. In this section, we will describe some of the most useful modules that are involved in managing the VMware infrastructure.
An inventory file is required to...