From 6d70144f55b2cb9c7c4b84e69364aab04abb5d5c Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Fri, 19 Jun 2026 10:58:12 +0200 Subject: Fix resolute ubuntu install Co-authored-by: Claude.ai --- roles/bootstrap/tasks/install-ubuntu.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'roles/bootstrap') diff --git a/roles/bootstrap/tasks/install-ubuntu.yml b/roles/bootstrap/tasks/install-ubuntu.yml index 047cbb1..89f351f 100644 --- a/roles/bootstrap/tasks/install-ubuntu.yml +++ b/roles/bootstrap/tasks/install-ubuntu.yml @@ -36,6 +36,16 @@ - dest: "{{ mnt_root_path }}/etc/apt/sources.list" content: "{{ bootstrap_apt_sources }}" +- name: "Ensure DNS works in chroot" + # debootstrap seeds /etc/resolv.conf as a symlink to the systemd-resolved stub (127.0.0.53), + # which is broken when /run is a tmpfs (e.g. in Docker/molecule) + ansible.builtin.copy: + src: "/etc/resolv.conf" + dest: "{{ mnt_root_path }}/etc/resolv.conf" + follow: false + force: true + mode: "0644" + - name: "Configure system in chroot" ansible.builtin.command: cmd: "arch-chroot {{ mnt_root_path }} {{ item }}" -- cgit v1.2.3