Skip to content

Prefer hostnames over IP addresses

Latest
Compare
Choose a tag to compare
@jszwedko jszwedko released this 09 Oct 19:57
· 7 commits to master since this release

This release rather drastically changes the behaviour the inventory endpoints to place hostnames rather than IP addresses in each group.

The creation of hostname groups (which had the respective IP addresses) was replaced with the creation of IP address groups which contain respective hostnames.

I.e.

'192.168.1.9': [
    'foo.demo.bar.com'
]

is now

'foo.demo.bar.com': [
    '192.168.1.9'
]

When using tory_client as an inventory source for Ansible, this means that Ansible will attempt to SSH via the DNS name rather than by IP (unless you set ansible_ssh_host for the host).