summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2026-06-19 10:58:12 +0200
committerAhmed Abdelhalim <[email protected]>2026-06-19 10:58:12 +0200
commit6d70144f55b2cb9c7c4b84e69364aab04abb5d5c (patch)
treec063dbe995b078e86b92456630cbe2d2b12c298a
parentb5ceb6e014b71dd85aae49bd713115d995461a20 (diff)
Fix resolute ubuntu install
Co-authored-by: Claude.ai
-rw-r--r--roles/bootstrap/tasks/install-ubuntu.yml10
1 files changed, 10 insertions, 0 deletions
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 }}"