Ansible is the glue for VMware and DevOps, Many DevOps engineers use vRealize Automation to automate the Provisioning of VMs but there are a lot of chances that VMware isn’t the only infrastructure tool your company uses.
Ansible helps you to do provisioning on multiple clouds, in this blog I try to explain the creation of Virtual Machine from a template on VMware vCenter
Ansible provides various modules to manage the VMware Infrastructure, which included datacenter, cluster, host system and virtual machine.
As a pre-requisite we need to install pyVmomi, the VMware modules are written over the top of VMware VSphere API SDK for Python ( PyVmomi), You can install pyVmomi using pip
pip install pyvmomi
Ansible playbook are expressed in YAML format and have a minimum of syntax, which intentionally tires to not be a programming language or script but rather a model of a configuration or a process
Here is the PlayBook to create a VM from template
Create a file test.yml and paste the below code and change the details under the vmware guest
Run the above playbook by
ansible-playbook test.yml --connection=local
Passionate Developer with 7 years of extensive experience working for Data center related products. Contributed and lead the efforts in Solutioning and engineering in Nimesa Technologies for developing Dataprotection and Copy data management product for Private and Public Clouds
This is my personal weblog, opinions expressed here represent my own and not those of my employer.
All content provided on this blog is for informational purposes only and i will not be liable for any errors, losses, or damages from the display or use of this information.