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 {