I'm trying to use the "{{ansible_fqdn}}" to name certain files with the hostname in a VM in openstack. Openstack has private/public IP/Hostname and it uses the private hostname to name the file. The playbook I'm using is https://github.com/jdauphant/ansible-role-ssl-certs/blob/master/defaults/main.yml. Looked around google to see how ansible finds this hostname and it said by using:
To name the file using the Public hostname or the name that DNS has instead of the name of the VM when it was created. For example, DNS has this hostname as dude.hadoop.cloud.org but, instead it created the file with the name of the VM when it was created.
ACTUAL RESULTS
When you create a VM in openstack it asks for an instance name. A VM is created with $instance name and uses that as its private name. This is the name that ansible picks up. This is somewhat the same with AWS.
The text was updated successfully, but these errors were encountered:
@chagara Is the public IP address listed in the "ip addr show" output? I don't think most cloud instances expose the public IP to the instance. I think you probably need to look at using the API to get the data you want, which is probably available via the open stack facts module: http://docs.ansible.com/ansible/os_server_facts_module.html
Please take a look into that and if you need further guidance, use the ansible project mailing list or the irc channel.
ISSUE TYPE
-Bug Report
COMPONENT NAME
{{ansible_fqdn}}
ANSIBLE VERSION
CONFIGURATION
using certain ansible variables. Using this playbook https://github.com/jdauphant/ansible-role-ssl-certs
OS / ENVIRONMENT
SUMMARY
I'm trying to use the "{{ansible_fqdn}}" to name certain files with the hostname in a VM in openstack. Openstack has private/public IP/Hostname and it uses the private hostname to name the file. The playbook I'm using is https://github.com/jdauphant/ansible-role-ssl-certs/blob/master/defaults/main.yml. Looked around google to see how ansible finds this hostname and it said by using:
Is their a way to make ansible query DNS using the Public IP to get the Public name?
STEPS TO REPRODUCE
EXPECTED RESULTS
To name the file using the Public hostname or the name that DNS has instead of the name of the VM when it was created. For example, DNS has this hostname as dude.hadoop.cloud.org but, instead it created the file with the name of the VM when it was created.
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: