Ansible dynamic inventory
-
I'm exploring using xo-lib to build a dynamic inventory for ansible.
Looks like it should be pretty simple, to get a list of hosts, with ip's if they agents installed and leverage tags and/or custom fields for host varsBut whats missing, is a way to create group vars cleanly. I can group servers using tags, like
ansible_group:webbut i can't see a way to create vars for that group without repeating them on every host.If anyone has tackled this issue i'd love to hear how you approached it.
And i guess maybe theres a Feature Request here - Create VM Groups, where Groups can have tags attached. If we had that, then an Ansible Inventory Plugin would be a simple bolt on
EDIT -
Just to add, i've seen this https://github.com/vtsingaras/xenorchestra_inventory/blob/master/xenorchestra.py
and i'm aware there was a question back in July about ansible inventory that got no replies so maybe theres not a lot of love for dynamic inv here
Or maybe people are using other inv management tools... love to know what -
We sponsored someone to work on Terraform and Packer. But every contribution is welcome, on Ansible too

Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login