diff options
| author | Ahmed Abdelhalim <[email protected]> | 2025-08-21 03:24:34 +0200 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2025-08-21 03:24:34 +0200 |
| commit | 0f9de5e20c996ef231db505bbe18402c1ea7021e (patch) | |
| tree | 6f58f2b7f5f172d0ce62fe365159b88be47bb407 | |
| parent | 22d1ae642daf7cc6b3f7897f50bac3941e336f5c (diff) | |
Fix the wireguard install
The conflict was due to resolvconf was removing the systemd-resolved
configuration and that was causing the network to go down and the
fallback on the statically managed resolv.conf (which wasn't able to
resolve the DNS) due to how network manager requiring the DNS resolution
to happen through systemd-resolved
| -rw-r--r-- | roles/network/tasks/main.yml | 6 | ||||
| -rw-r--r-- | roles/wireguard/tasks/main.yml | 2 | ||||
| -rw-r--r-- | roles/wireguard/vars/debian.yml | 1 | ||||
| -rw-r--r-- | site.yml | 2 |
4 files changed, 2 insertions, 9 deletions
diff --git a/roles/network/tasks/main.yml b/roles/network/tasks/main.yml index fd2553ff..c8c48268 100644 --- a/roles/network/tasks/main.yml +++ b/roles/network/tasks/main.yml @@ -54,12 +54,6 @@ - "Restart NetworkManager" - "Restart systemd-resolved" block: - - name: "Remove resolv.conf symlink" - ansible.builtin.file: - path: "/etc/resolv.conf" - state: "absent" - when: not ansible_is_chroot - - name: "Configure systemd-resolved" ansible.builtin.template: src: "resolved.conf.j2" diff --git a/roles/wireguard/tasks/main.yml b/roles/wireguard/tasks/main.yml index 45011ea1..aaed64ab 100644 --- a/roles/wireguard/tasks/main.yml +++ b/roles/wireguard/tasks/main.yml @@ -43,7 +43,7 @@ ansible.builtin.command: cmd: "wg-quick down {{ item }}" with_items: "{{ wireguard_connections.keys() | list }}" - changed_when: true + changed_when: false failed_when: false - name: "Enable and start wg-quick service for connection {{ wireguard_autostart_connection }}" diff --git a/roles/wireguard/vars/debian.yml b/roles/wireguard/vars/debian.yml index f9c5f5f7..d98f40cb 100644 --- a/roles/wireguard/vars/debian.yml +++ b/roles/wireguard/vars/debian.yml @@ -1,4 +1,3 @@ --- wireguard_pkgs: - "wireguard" - - "resolvconf" @@ -39,4 +39,4 @@ roles: - role: "locales" - role: "timezone" - - role: "pihole" + - role: "wireguard" |
