From fc25990b231623c3aff7f6e1323e45bed4f9a958 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Mon, 25 Dec 2023 15:25:55 +0200 Subject: TEMP FIX: create resolv.conf in vmdb2 chroot The chroot has no /etc/resolv.conf when Ansible runs, for reasons I don't understand yet, and thus Ansible can't install new packages. Signed-off-by: Lars Wirzenius Sponsored-by: author --- installer-ansible.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/installer-ansible.yml b/installer-ansible.yml index 2b2914e..f6bfe6e 100644 --- a/installer-ansible.yml +++ b/installer-ansible.yml @@ -3,6 +3,19 @@ - hosts: image tasks: + # This is a workaround for the fact the the chroot vmdb2 creates + # lacks an /etc/resolv.conf. + - name: "install a temporary /etc/resolv.conf" + copy: + content: + nameserver 8.8.8.8 + dest: /etc/resolv.conf + + - name: "check /etc/resolv.conf and DNS lookup work" + shell: | + cat /etc/resolv.conf || true + ping -c1 pieni.net + # General configuration of installer system. - name: "install file with version info of installer" -- cgit v1.2.1