From f77cd8a569c8e06c0d5e391a495e5d89d7375be6 Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Tue, 30 Jun 2026 13:13:35 +0200 Subject: Fix DNS resolution for ubuntu mac For some unknown reason (ubuntu :shrug:) the /etc/resolv.conf file is created and breaks the network manager role for DNS resolution --- roles/bootstrap/tasks/install-ubuntu-mac.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/roles/bootstrap/tasks/install-ubuntu-mac.yml b/roles/bootstrap/tasks/install-ubuntu-mac.yml index 73c9854..23ead61 100644 --- a/roles/bootstrap/tasks/install-ubuntu-mac.yml +++ b/roles/bootstrap/tasks/install-ubuntu-mac.yml @@ -23,3 +23,12 @@ line: "wl" create: true mode: "0644" + +- name: "Symlink resolv.conf to systemd-resolved stub" + # NOTE: "Ensure DNS works in chroot" in install-ubuntu.yml copies the macOS + # resolv.conf which breaks internet access (DNS resolving). + ansible.builtin.file: + src: "/run/systemd/resolve/stub-resolv.conf" + dest: "{{ mnt_root_path }}/etc/resolv.conf" + state: link + force: true -- cgit v1.2.3