ansible/ansible — pull request #855 by sfromm (2012-08-12 13:47:30+00:00)
Title: Set ipv4_address and ipv6_address to most likely default

Currently, ipv4_address and ipv6_address are set to the first ip{4,6}
address found via '/sbin/ip addr show'. The first ip address found may
not always be the best choice. In my case, this was set to a rfc1918
address. This changes the behavior to set ipv4_address and ipv6_address
to the address based on the host's fqdn. If socket.getaddrinfo()
somehow returns an address not discovered by parse_ip_addr(), the first
address in the sorted list will be taken.