I'm using Ansible to provision the VMs, which works fine. Dnsmasq handles the DHCP so they get an IP automatically. However, there is no DNS configured so the VMs cannot communicate with each other by hostname, only by IP.
I've read a couple of guides which tells me I have to create a new domain with
virsh net-define and
virsh net-edit. However, I have to do that manually. This guide is the one I have been following.
Is it possible to somehow do it automatically, is it any better way than the guide I provided?
Just as a simplicity, I have added the hosts to
/etc/hosts but it feels like there should be better solutions?