From a86eac38f0ad6b62ded087015db775f1e2a843e3 Mon Sep 17 00:00:00 2001 From: Louis Vallat Date: Thu, 17 Nov 2022 10:44:17 +0100 Subject: [PATCH] fix: disable systemd-resolved before installing dnsmasq Signed-off-by: Louis Vallat --- roles/dnsmasq/tasks/main.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/roles/dnsmasq/tasks/main.yaml b/roles/dnsmasq/tasks/main.yaml index 22e7483..13f3f24 100644 --- a/roles/dnsmasq/tasks/main.yaml +++ b/roles/dnsmasq/tasks/main.yaml @@ -1,4 +1,16 @@ --- +- name: Ensure systemd-resolved doesn't interfere + ansible.builtin.lineinfile: + path: /etc/systemd/resolved.conf + regexp: '^DNSStubListener=' + insertafter: '^[Resolve]' + line: DNSStubListener=no + +- name: Restart systemd-resolved service + ansible.builtin.service: + name: systemd-resolved + state: restarted + - name: Install dnsmasq ansible.builtin.apt: name: dnsmasq