How to pass a private IP from ansible

There is openstack. The tenant/project 1 WM.

If you run ansible c inventory of you will get the error:
ansible -i --private --list all-m ping

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 with the flag --private, you can get the private IP
./ --refresh --private --list |grep-i ansible_host
"ansible_host": "",

How to pass a private IP from ansible
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
but you can try running type
ansible -i $( --private) --list all-m ping
(not tested, probably screwed up the syntax)

Find more questions by tags AnsibleOpenStack