Hello!
I'm working with the community.general.xen_orchestra
dynamic inventory plugin and trying to implement group-specific variables through the tagging function.
For instance, here's an example of a static inventory I currently have. Nothing fancy.
gp1:
vars:
ansible_user: admin
hosts:
server1.example.com:
server2.example.com:
gp2:
vars:
ansible_user: anotheradmin
hosts:
server3.example.com:
server4.example.com:
The following dynamic inventory configuration works fine:
plugin: community.general.xen_orchestra
api_host: xo.example.com
user: admin
password: mypass
validate_certs: true
use_ssl: true
groups:
gp1: "'gp1' in tags"
gp2: "'gp2' in tags"
But adding group vars breaks it:
[...]
groups:
gp1: "'gp1' in tags"
vars:
ansible_user: admin
gp2: "'gp2' in tags"
vars:
ansible_user: anotheradmin
I'm wondering if the plugin supports adding group-specific variables directly in the dynamic inventory configuration.
Would appreciate hearing if anyone has made this work and the most elegant and supported solution. I looked extensively through the forum, blog posts, etc. and could not figure it out.
Thanks in advance for your help!