From 1ddcc40476de5b1f772a7a509fc204015aaa5fc4 Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Tue, 21 May 2024 22:34:19 +0200 Subject: [PATCH] kea: query primary dns server for hostnames otherwise the role will fail if the host it is deployed from has VPN but is not using our DNS infra --- roles/kea/templates/kea/kea-dhcp4.conf.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/kea/templates/kea/kea-dhcp4.conf.j2 b/roles/kea/templates/kea/kea-dhcp4.conf.j2 index 8678a59..0a0d71d 100644 --- a/roles/kea/templates/kea/kea-dhcp4.conf.j2 +++ b/roles/kea/templates/kea/kea-dhcp4.conf.j2 @@ -28,12 +28,12 @@ "sync-timeout": 60000, "peers": [ { - "name": "{{ lookup('dig', dhcpd_primary+'/PTR').split('.')[0] }}", + "name": "{{ lookup('dig', dhcpd_primary+'/PTR', '@'+dns_primary).split('.')[0] }}", "url": "http://{{ dhcpd_primary }}:8000/", "role": "primary" }, { - "name": "{{ lookup('dig', dhcpd_secondary+'/PTR').split('.')[0] }}", + "name": "{{ lookup('dig', dhcpd_secondary+'/PTR', '@'+dns_primary).split('.')[0] }}", "url": "http://{{ dhcpd_secondary }}:8000/", "role": "standby" }