If no addresses are attached to a server, then both facts will not be defined.
IP, полагаю, имеются у серверов?
Сделай ansible-inventory list
ilya@jumphost:/home/cloud$ ansible-inventory -i /home/ilya/ansible/openstack.yaml --list
[WARNING]: Invalid characters were found in group names but not replaced, use
-vvvv to see details
{
"CloudDC777": {
"hosts": [
"appm-rk-adm01",
"appm-rk-master01",
"appm-rk-worker-1"
]
},
"_meta": {
"hostvars": {
"appm-rk-adm01": {
"ansible_host": "",
"ansible_ssh_host": "",
"openstack": {
"addresses": {
"dc3-vlan1276_network": [
{
"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:42:cf:71",
"OS-EXT-IPS:type": "fixed",
"addr": "172.27.162.142",
"version": 4
}
]
},
"adminPass": null,