From e1edd338aa1444ddef5f667348c5f19ba2ad7096 Mon Sep 17 00:00:00 2001 From: Timo Makinen Date: Tue, 24 Jun 2025 12:38:19 +0000 Subject: [PATCH] dhcpd: Advertise NTP servers on dna-gw hosts --- roles/dhcpd/templates/dhcpd.conf.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/dhcpd/templates/dhcpd.conf.j2 b/roles/dhcpd/templates/dhcpd.conf.j2 index 4225a2b..5f3d59e 100644 --- a/roles/dhcpd/templates/dhcpd.conf.j2 +++ b/roles/dhcpd/templates/dhcpd.conf.j2 @@ -73,6 +73,10 @@ subnet {{ intnet | ansible.utils.ipaddr('network') }} netmask {{ intnet | ansibl ] | join(', ') }}; use-host-decl-names on; + option ntp-servers {% for host in groups['dnagw_' + intdomain.split('.')[0]] -%} + {{ hostvars[host]['network_interfaces'][0].ipaddr -}} + {{ ', ' if not loop.last -}} + {% endfor %}; {% if network_interfaces[0].vlan == 30 %} pool {