Ansible update /etc/hosts file of all servers within host group - DNS setup

preview_player
Показать описание
When there is no DNS server in your infrastructure, How do you make ansible remote hosts be aware of each other server's IP address.

Yes, The local DNS or /etc/hosts file is the only option

This video talks about how to update the /etc/hosts file across the ansible remote servers to enable DNS lookup between the host group members.

As a Result. Each remote host would be able to connect to the remote server using their hostname and not just IP.

Theoretical explanation of this post can be found here
Рекомендации по теме
Комментарии
Автор

thanks man, you really save une big issue for me, it totally works, i used with "all" tag

alanduarte
Автор

Can you upload one more video for Ansible URI module with POST and PUT module

dineshlanka
Автор

i want to add only one entry in /etc/hosts ip hostname.domain hostname. how should i can achieve this

GAURAVKUMAR-qfxt