Hi,
I have created a vm with 3 network interfaces using a heat template in an openstack cloud environment.
One of the interfaces are reachable from the outside the cloud and the other two interfaces are private networks inside the cloud.
+--------------------------------------+-----------------------+--------+------------+-------------+---------------------------------------------------------------------------------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-----------------------+--------+------------+-------------+---------------------------------------------------------------------------------------------------------+
| cffb942b-44c1-4ee4-b31a-a46599912913 | qwm-0 | ACTIVE | - | Running | qw-loopback=10.20.160.16; external=10.68.32.157; qw-cn-up=10.20.150.16 |
I can ssh into the vm at 10.68.32.157 but not via 10.20.160.16 nor 10.20.150.16.
The problem is that ansible thinks 10.20.150.16 is the address to use why I use dynamic inventory:
inventory/openstack.py --list | egrep -i "ansible_ssh_host|accessIPv4"
"ansible_ssh_host": "10.20.150.16",
"accessIPv4": "10.20.150.16",
How can I control ansible so it always set "external" network ip addresses to ansible_ssh_host and accessIPv4?
Thanks
Mathias