From d57196fb679618e472680af7fd384371b088667b Mon Sep 17 00:00:00 2001
From: Marty Oehme <marty.oehme@gmail.com>
Date: Fri, 21 Feb 2025 13:43:00 +0100
Subject: [PATCH] Put resolvd file into chroot to give chroot void network
 access

---
 host.yaml | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/host.yaml b/host.yaml
index 1e7eb51..11bb730 100644
--- a/host.yaml
+++ b/host.yaml
@@ -29,4 +29,16 @@
         # ONLY run if this file does not exist (could use any rootfs file to check)
         creates: "{{ mount_dir }}/etc/os-release"
 
-# - name: Mount /boot part into voidroot mount
+    # - name: Mount /boot part into voidroot mount
+
+    # TODO: Should be removed again at the end?
+    # However only after the whole PLAYBOOK has run not after this play
+    # not sure how to accomplish, see
+    # https://newbe.dev/run-an-ansible-handler-only-once-for-the-entire-playbook
+    # for possible solutions (especially lowest, hosts_to_restart example)
+    - name: Use archlinux resolvd for network access
+      ansible.builtin.file:
+        path: "{{ mount_dir }}/etc/resolv.conf"
+        state: touch
+
+