Ansible dynamic inventory and XO
-
@kirovtome I have found this script https://github.com/vtsingaras/xenorchestra_inventory...
-
Can you describe a bit more your use case and what do you want to achieve? (functionally speaking)
-
@olivierlambert @kirovtome I have created a simple way to return the dynamic inventory to use on Ansible. https://github.com/luizhpriotto/xenorchestra_inventory
I think the https://github.com/vtsingaras/xenorchestra_inventory doesn't work anymore.
Thanks.
-
I'm not an Ansible expert, what is the purpose of Ansible inventory? What's your use case exactly?
-
@olivierlambert in Ansible we have to create a static file with groups and ip of vms to run owner playbooks.
My solution is a simple way to create this file using tags like groups and getting the ip automagically, like this:
[kub] #xo tag
192.168.1.152 #vm ip
192.168.1.42 #vm ip[worker]
192.168.1.152[2021.01]
192.168.1.152[XOA]
192.168.1.152[master]
192.168.1.4 -
So your playbook will automatically "sort" VMs category using tags in XO?
-
This post is deleted! -
@luizhpriotto Awesome! I'll check it out later today. Cheers!
-
@olivierlambert exactly!
-
Nice