How to pass a private IP from ansible openstack_inventory.py?

There is openstack. The tenant/project 1 WM.

If you run ansible c inventory of openstack_inventory.py you will get the error:
ansible -i openstack_inventory.py --private --list all-m ping
[ERROR]:

985191f9-e828-424b-b9c5-8805304b205f | UNREACHABLE! => {
 "changed": false, 
 "msg": "Failed to connect to the host via ssh: ssh: Could not resolve hostname 985191f9-e828-424b-b9c5-8805304b205f: Name or service not known\r\n", 
 "unreachable": true
}


If you run openstack_inventory.py with the flag --private, you can get the private IP
./openstack_inventory.py --refresh --private --list |grep-i ansible_host
"ansible_host": "172.26.10.9",

How to pass a private IP from ansible openstack_inventory.py?
April 19th 20 at 12:19
1 answer
April 19th 20 at 12:21
something tells me that the key to the script is not getting through
the easiest way to switch to the plugin instead of the script
https://docs.ansible.com/ansible/latest/plugins/in...
but you can try running type
ansible -i $(openstack_inventory.py --private) --list all-m ping
(not tested, probably screwed up the syntax)

Find more questions by tags AnsibleOpenStack