I am trying to run ansible command on a windows server from WSL ubuntu machine. Even ping is failing.
Resolution: Add search <domain name> in /etc/resolve.conf file. You should now be back at the command prompt, now we’ll ensure that WSL doesn’t still overwrite this file (it tends to regenerate it whenever you close and reopen WSL’s command line):