diff --git a/roles/wireguard/tasks/main.yml b/roles/wireguard/tasks/main.yml
index bf89f3c740b6e34d50de809083323785a5885947..465ece189ebef2bcfb944ab3a7ab1bfc1c0415fd 100644
--- a/roles/wireguard/tasks/main.yml
+++ b/roles/wireguard/tasks/main.yml
@@ -12,4 +12,9 @@
 - name: Install wireguard
   apt:
     update_cache: true
-    name: wireguard
+    name:
+      - wireguard
+      - resolvconf
+  register: apt_result
+  retries: 3
+  until: apt_result is succeeded