On 26.01.2019 01:37, boncalo mihai wrote:
The thing is that Ansible uses /etc/hosts file in a way, because the hostname you place into inventory file, or in ansible hosts file must be found in /etc/hosts file in order to be associated to a IP Address if I'm not mistaken.
Actually Ansible doesn't use /etc/hosts, but your operation system usually does.
Ansible just send the request to the OS and get an IP in response. The name doesn't need to be in /etc/hosts, it could be in DNS as well. The OS searches /etc/hosts first, it it doesn't find it will try DNS. -- Kai Stian Olstad -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ea4312601d1c076b663d537cabfd723a%40olstad.com. For more options, visit https://groups.google.com/d/optout.
