Bug: openstack:facts sets ansible_host to an empty string if no public IP is present
Summary
openstack:facts
sets ansible_host
to an empty string if no public IP is present
Steps to reproduce
- Create an instance.
- Do not set a floating IP.
- Do not set
openstack_instance_ansible_network
in inventory.
Expected behavior
ansible_host
== openstack_server.private_v4
Actual behavior
ansible_host
== ''
Possible fixes
Change
if 'public_v4' in server:
to
if server.get('public_v4', ''):