ara
ara copied to clipboard
The controller hostname recorded by ara for the controller can be something like 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa (on OS X?)
What is the issue ?
Using ara under Mac OS X, the hostname that python picks up on my machine is 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa
which isn't particularly useful when the hostname
and hostname -f
commands both return a proper hostname like laptop.example.org
.
We rely on python's socket.getfqdn() and socket.gethostname() to retrieve the hostname: https://github.com/ansible-community/ara/blob/196e256589893745c9f732c84f8edb7662997846/ara/plugins/callback/ara_default.py#L829-L833
On OS X (at least on my machine, I'm an OS X noob), getfqdn
returns the ipv6 arpa mentioned previously and gethostname
returns the actual hostname.
What should be happening ?
There's settings that determine which format is used:
In this particular case, hostname
would probably be a better default than fqdn
. Is this generally true for all distros ?
Changing it could result in playbooks being associated to a "new" controller if the fqdn and hostname are not the same.
Happy to hear what you think.