githubixx/ansible-role-wireguard

Ubuntu 2004 missing resolvconf package by default.

upodroid opened this issue · 1 comments

Hello

The role doesn't check if resolvconf is installed on ubuntu-2004. Installing the package resolves the error.

root@vpn:/etc/wireguard# journalctl -u wg-quick@wg0
-- Logs begin at Fri 2021-07-30 14:30:50 UTC, end at Fri 2021-07-30 15:50:08 UTC. --
Jul 30 15:38:41 vpn systemd[1]: Starting WireGuard via wg-quick(8) for wg0...
Jul 30 15:38:41 vpn wg-quick[24657]: [#] ip link add wg0 type wireguard
Jul 30 15:38:41 vpn wg-quick[24657]: [#] wg setconf wg0 /dev/fd/63
Jul 30 15:38:42 vpn wg-quick[24657]: [#] ip -4 address add 192.168.1.52/32 dev wg0
Jul 30 15:38:42 vpn wg-quick[24657]: [#] ip link set mtu 1420 up dev wg0
Jul 30 15:38:42 vpn wg-quick[24681]: [#] resolvconf -a wg0 -m 0 -x
Jul 30 15:38:42 vpn wg-quick[24683]: /usr/bin/wg-quick: line 32: resolvconf: command not found
Jul 30 15:38:42 vpn wg-quick[24657]: [#] ip link delete dev wg0
Jul 30 15:38:42 vpn systemd[1]: wg-quick@wg0.service: Main process exited, code=exited, status=127/n/a
Jul 30 15:38:42 vpn systemd[1]: wg-quick@wg0.service: Failed with result 'exit-code'.
Jul 30 15:38:42 vpn systemd[1]: Failed to start WireGuard via wg-quick(8) for wg0.
root@vpn:/etc/wireguard# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.2 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.2 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

Hi,

TBH I've no idea. My Moleule tests use a fresh installation of Ubuntu 20.04 and I didn't had this issue at any time there. I also can't find the usage of resolvconf command in any of my systemd journal's. Maybe you're using a WireGuard option that requires this tool to be installed or you've a very stripped down version of Ubuntu installed.

There are reports out there that suggests installing openresolv package in case of this error. But I don't see a reason to do so as systemd-resolved has everything needed in place which the default for Ubuntu 20.04.

Regards