summaryrefslogtreecommitdiff
path: root/installer-ansible.yml
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2023-12-26 06:26:04 +0000
committerLars Wirzenius <liw@liw.fi>2023-12-26 06:26:04 +0000
commit01d40c024003e9fddd0b2b9dd1250796aeeda76d (patch)
tree9ebf66f41f8853ef4fdb54ea0a4245759510c41a /installer-ansible.yml
parentdd8430b14a39e1dc030053a39815e2d77c6e6f63 (diff)
parent1c67b1c2fd6168b56955536ee679f50f161f4998 (diff)
downloadv-i-01d40c024003e9fddd0b2b9dd1250796aeeda76d.tar.gz
Merge branch 'resolve' into 'main'
systemd-resolved See merge request larswirzenius/v-i!60
Diffstat (limited to 'installer-ansible.yml')
-rw-r--r--installer-ansible.yml23
1 files changed, 23 insertions, 0 deletions
diff --git a/installer-ansible.yml b/installer-ansible.yml
index e924f06..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"
@@ -152,8 +165,18 @@
[DHCPv4]
RouteMetric=20
+ UseDomains=true
dest: /etc/systemd/network/eth0.network
+ # Allow lookup of domain-less names, when the DHCP server doesn't
+ # set a domain for the LAN. See
+ # https://wiki.archlinux.org/title/Systemd-resolved#systemd-resolved_does_not_resolve_hostnames_without_suffix
+ - name: "tweak resolved.conf for domain-less DNS lookup"
+ lineinfile:
+ path: /etc/systemd/resolved.conf
+ regexp: ResolveUnicastSingleLabel=
+ line: ResolveUnicastSingleLabel=yes
+
- name: "configure bridge device br0 for local network ports"
copy:
content: |