How is ansible_fqdn Determined?

How is ansible_fqdn Determined? My el6 lab environments are a mess currently and I’d like to clean them up if possible.

Thanks,
Chris Short

It uses https://docs.python.org/2/library/socket.html#socket.getfqdn