Following repos show how Ansible can be utilized to consume VMware HTTP APIs.
VMware HTTP APIs are supported in vCenter 6.5 and onwards. So, in order to use these playbooks you need to have vCenter version greater than equal to 6.5.
If you are going to use Pyvmomi based (XMLRPC based) modules then you need to install Pyvmomi
using pip install pyvmomi
.
Example Ansible playbook to manage VMware using HTTP APIs:
- Get a list of all Datacenters available
- Get a list of all Clusters available
- Get a list of all ESXi hosts available
- Get a list of all Datastores available
- Get a list of all Network available
- Get a list of all Virtual machine available
- Get a list of all categories available
- Get a list of all tags available
- Get information about the given Cluster
- Get a list of tags attached to the given virtual machine
Currently, these APIs are under development so not all features are available in vCenter server as a part of API.