From 6bf441c9d4be2da1938f217aead490cf2e3bda65 Mon Sep 17 00:00:00 2001 From: Romina Brown Date: Mon, 27 Apr 2026 14:08:59 -0300 Subject: [PATCH] systmed-resolved configuration to avoid conflicts with zimbra-dnscache --- tasks/configure/dnscache.yml | 28 ++++++++++++++++++++++++++++ tasks/main.yml | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 tasks/configure/dnscache.yml diff --git a/tasks/configure/dnscache.yml b/tasks/configure/dnscache.yml new file mode 100644 index 0000000..55e0211 --- /dev/null +++ b/tasks/configure/dnscache.yml @@ -0,0 +1,28 @@ +--- + +- name: Deshabilitar resolvedor local + ansible.builtin.ini_file: + path: /etc/systemd/resolved.conf + section: Resolve + option: DNSStubListener + value: "no" + register: disable_dns_stub_listener + +- name: Destruir enlace simbólico + file: + path: /etc/resolv.conf + state: absent + when: disable_dns_stub_listener.changed + +- name: Crear enlace simbólico + file: + path: /etc/resolv.conf + src: /run/systemd/resolve/resolv.conf + state: link + when: disable_dns_stub_listener.changed + +- name: Reiniciar servicio systemd-resolved + ansible.builtin.service: + name: systemd-resolved + state: restarted + when: disable_dns_stub_listener.changed \ No newline at end of file diff --git a/tasks/main.yml b/tasks/main.yml index 2def1c9..33ee889 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -28,6 +28,8 @@ when: zimbra_store == 'y' - import_tasks: 'configure/mta.yml' when: zimbra_mta == 'y' +- import_tasks: 'configure/dnscache.yml' + when: zimbra_dnscache == 'y' # # Extras configuration process