VMware Cloud Community
abdelazizRaji
Contributor
Contributor
Jump to solution

Blueprint multiple VM inventory file

Hi All

I am Just getting started with VRA and have a couple of blueprints that will deploy a set of VM's  and  I am basically looking for the easiest way to get a host file of hostname/ip address post-deployment that I can then feed to ansible for post deployments tasks .

just a pointer to the right direction will be very helpful.

Best.

0 Kudos
1 Solution

Accepted Solutions
daphnissov
Immortal
Immortal
Jump to solution

If you have vRA Enterprise, yes, one option is with software components. But it's doing somewhat of double duty because you're boostrapping a bootstrapper. If you're not using Tower, which makes it more difficult, there are some options spelled out here. For Ansible without Tower, what I've used, which solves the multiple VMs case, is to execute Ansible directly on the control machine with LCT. Doesn't matter how many VMs in the deployment, for each one it can pass the hostname and/or IP for the playbook to run against.

---------------------------------------------------------------------------------------------------------

Was it helpful? Let us know by completing this short survey here.

View solution in original post

0 Kudos
6 Replies
daphnissov
Immortal
Immortal
Jump to solution

Please describe more what you hope to achieve with Ansible as it makes a difference.

0 Kudos
abdelazizRaji
Contributor
Contributor
Jump to solution

Thanks for the quick reply .

The ansible script will just install and configure the different VM's based on their role in the blueprint like any multi tier app (kubernetes, hadoop, spark cluster is a good example ) .

0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

There's all sorts of Ansible integration in vRA to make this happen. vRA deploys the VM in the desired location with the correct config; Ansible comes in and runs its playbooks to create the VM's identity. The one I see most often is the Tower integration one.

0 Kudos
abdelazizRaji
Contributor
Contributor
Jump to solution

Thanks daphnissov​ .Not looking into Tower Integration for now .

The solution with a single VM blueprint is straight forward but I don't know enough to solve the case when the blueprint contains multiple VM's  (and in some case that number can vary from one deployment to another based on the the user request).

Is the combined use of a software component updating an inventory file by inserting name/ip from other VM's through resource binding the most straight forward way to approach this ?

0 Kudos
daphnissov
Immortal
Immortal
Jump to solution

If you have vRA Enterprise, yes, one option is with software components. But it's doing somewhat of double duty because you're boostrapping a bootstrapper. If you're not using Tower, which makes it more difficult, there are some options spelled out here. For Ansible without Tower, what I've used, which solves the multiple VMs case, is to execute Ansible directly on the control machine with LCT. Doesn't matter how many VMs in the deployment, for each one it can pass the hostname and/or IP for the playbook to run against.

---------------------------------------------------------------------------------------------------------

Was it helpful? Let us know by completing this short survey here.

0 Kudos
abdelazizRaji
Contributor
Contributor
Jump to solution

More than enough to get me started .Much appreciated daphnissov​.

0 Kudos