Hi,
I'm in charge of deploying a software as a service to our customers.
This software requires multiple vms per instance, mostly windows (ad, sql, the software application servers...)
This will be hosted on VMware vSphere clusters.
So I basically started with VMware ansible modules to deploy vms.
My main interrogation is the inventory management. I went with a mongodb backend and a python Eve API to provide a restful API that ansible can consume to build it's inventory (via an inventory script).
Does it seem sane ?
Any inputs that could possibly help ?
I can ofc provide more Intel if needed.
Thanks !
Yes, but I need to store a lot of information software related, that the vmware inventory alone cannot provide.
Besides, I’m targeting an unknown and increasing number of vSphere vcenters, so I need (I think) an agnostic inventory that can provide me all this (like the VM role in the software stack, its local password…)
That’s why I chose to develop a small specific inventory backend.
One drawback (or consequence) of this is that I must return all my possible compute backends and associated variables in one inventory call, which could grow quite huge overtime.
I then must use variables in hosts pattern (playbooks) to target the correct host group (which contain a unique id, matching an extra var), which kinda complicates the playbooks readability with a lot of variables.
Is it possible to pass extra vars to an inventory script so that I can filter on the vcenter I need at inventory retrieval, instead of playbook run time ?
If yes I could make my script return static hostgroups names and use them in playbook in place of my dynamic host pattern.
Even writing this makes me realize this is fairly hard to explain Any idea to simplify this is welcomed !
.
you can use host vars and also use different inventories together. Just some information.