Merge pull request #26 from UdelaRInterior/2-systmed-resolved-configuration-to-avoid-conflicts-with-zimbra-dnscache

Disable existing DNS stub listener
This commit is contained in:
Lucas Costa Beyeler
2026-05-07 23:01:46 +01:00
committed by GitHub
4 changed files with 32 additions and 0 deletions
+1
View File
@@ -54,6 +54,7 @@ Role Variables
* **zmlogoapp:** Inform the path for your logo (Application Screen) - don't inform and no image will be applied;
* **timezone:** inform the timezone the playbook should set in your server;
* **zimbra_version:** Inform which version of Zimbra you want to install. Default: 8.8.15
* **disable_existing_dns_stub_listener:** Inform "y" to disable the systemd-resolved DNS stub listener and free up port 53. Default: **n**
Service Variables - Inform "y" or "n"
--------------
+1
View File
@@ -45,3 +45,4 @@ timezone: UTC
################################################################################
zimbra_version: 8.8.15
disable_existing_dns_stub_listener: n
@@ -0,0 +1,28 @@
---
- name: Disable local resolver
ansible.builtin.ini_file:
path: /etc/systemd/resolved.conf
section: Resolve
option: DNSStubListener
value: "no"
register: disable_dns_stub_listener
- name: Delete symbolic link
file:
path: /etc/resolv.conf
state: absent
when: disable_dns_stub_listener.changed
- name: Create symbolic link
file:
path: /etc/resolv.conf
src: /run/systemd/resolve/resolv.conf
state: link
when: disable_dns_stub_listener.changed
- name: Restart systemd-resolved service
ansible.builtin.service:
name: systemd-resolved
state: restarted
when: disable_dns_stub_listener.changed
+2
View File
@@ -28,6 +28,8 @@
when: zimbra_store == 'y'
- import_tasks: 'configure/mta.yml'
when: zimbra_mta == 'y'
- import_tasks: 'configure/disable_existing_dns_stub_listener.yml'
when: zimbra_dnscache == 'y' and disable_existing_dns_stub_listener == 'y'
#
# Extras configuration process