Wednesday, May 3, 2023

How to run Ansible playbook on vmware vcenter

 

How to run Ansible playbook on vmware vcenter

So we have below mentioned vcenter ip

192.168.29.195

first we will create host Inventory for vecenter ip on Ansible Tower as per below mentioned snapshot.











Now we will create a project to collect inventory report of vcenter

I already have playbook ready and saved in server path :

Credential I have mentioned in playbook itself., you can add it in survey also. Or use secret.yml file.

/var/lib/awx/projects/vcenter





Now we will create a template to execute job, and will selecte the below mentioned yml file from tower to execute.




You can also use below github link to use playbook.

https://github.com/area51coder/vmwareinventory

reports will get generate and save on given location in playbook in html format.




No comments: