Take a look at this issue, it explains how this can be achieved: https://github.com/ansible/ansible/issues/82119
On Mon, Nov 20, 2023 at 10:27 AM Gabriel ARGENTIERI <[email protected]> wrote: > Hello, > > On AWX (AWX 19.4.0) installed with AWX Operator, > > We use the Openstack plugin ( > https://docs.ansible.com/ansible/latest/collections/openstack/cloud/openstack_inventory.html) > to bring up hosts in an inventory, on the other hand, we use the v4/v6 dual > stack on openstack, > Here are the variables for a host in the inventory: > > { > "ansible_host": "2a06:7d90:0:cafe:f816:3eff:fe4a:2175", > "ansible_ssh_host": "2a06:7d90:0:cafe:f816:3eff:fe4a:2175", > "openstack": { > "access_ipv4": "", > "access_ipv6": "", > "addresses": { > "fr-1-public": [ > { > "OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:4a:21:75", > "OS-EXT-IPS:type": "fixed", > "addr": "2a06:7d90:0:cafe:f816:3eff:fe4a:2175", > "version": 6 > }, > { > "OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:4a:21:75", > "OS-EXT-IPS:type": "fixed", > "addr": "185.100.51.21", > "version": 4 > } > ] > }, > > On the other hand, when launching a playbook, it's based on > ansible_ssh_host so in IPV6, but I can't find a way to prioritize ipv4, do > you have any ideas? > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/22d8d712-a650-4659-9e71-f2f3f9cdff40n%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/22d8d712-a650-4659-9e71-f2f3f9cdff40n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Matt Martz @sivel sivel.net -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAD8N0v_3gZz5Sw1hXpTHWvndF1wfc_G%2BMdYC8PrS6%3D0hYJK51g%40mail.gmail.com.
