From fde77c3f9e119df17617e6390cd0b8b64560ab5b Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Tue, 21 Nov 2023 10:12:48 -0500 Subject: [PATCH] feat(ansible): remove search domain from /etc/resolv.conf Signed-off-by: Devin Buhl --- .../ansible/playbooks/cluster-prepare.yaml.j2 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/bootstrap/templates/ansible/playbooks/cluster-prepare.yaml.j2 b/bootstrap/templates/ansible/playbooks/cluster-prepare.yaml.j2 index 440439f4..cb978d8d 100644 --- a/bootstrap/templates/ansible/playbooks/cluster-prepare.yaml.j2 +++ b/bootstrap/templates/ansible/playbooks/cluster-prepare.yaml.j2 @@ -72,6 +72,19 @@ dest: /etc/systemd/networkd.conf regexp: ManageForeignRoutes line: ManageForeignRoutes=no + # https://github.com/onedr0p/flux-cluster-template/discussions/635 + - name: Network Configuration | Remove /etc/resolv.conf + ansible.builtin.file: + path: /etc/resolv.conf + state: absent + - name: Network Configuration | Remove search domain + ansible.builtin.copy: + attributes: +i + mode: 644 + dest: /etc/resolv.conf + content: | + search . + nameserver 1.1.1.1 - name: System Configuration notify: Reboot