summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2023-12-25 15:25:55 +0200
committerLars Wirzenius <liw@liw.fi>2023-12-26 08:25:09 +0200
commitfc25990b231623c3aff7f6e1323e45bed4f9a958 (patch)
treea4fccd8109551e4b1de49594baaf590da5d1435e
parent87c7661268b0ea7bfe511ae7edb9ef6730484c2a (diff)
downloadv-i-fc25990b231623c3aff7f6e1323e45bed4f9a958.tar.gz
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 <liw@liw.fi> Sponsored-by: author
-rw-r--r--installer-ansible.yml13
1 files changed, 13 insertions, 0 deletions
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"