For some mysterious reason, on one of my hosts, the /etc/nsswitch.conf file (actually /etc/static/nsswitch.conf) contains the following hosts line:
hosts: mymachines resolve [!UNAVAIL=return] files myhostname dns
On my other hosts it contains what I actually want it to contain:
hosts: mymachines files myhostname dns
I can’t for the life of me figure out what is causing it to add [!UNAVAIL=return] and I’d like that to be removed because now it’s not resolving hostnames without domain names on my LAN.
Yes, I still have this issue. Well, you could always move the /etc/nsswitch.conf symlink aside and put a file in its place manually.
I suspect that what’s causing it is systemd.network. This one host is my only host using that, that is also getting this configuration entry in nsswitch.conf. So you could try to configure your networking with systemd.network.