From 7a249edecebcd81470f656171b0260bef5401ec5 Mon Sep 17 00:00:00 2001 From: Timo Makinen Date: Thu, 24 Jul 2025 18:33:04 +0000 Subject: [PATCH] ntpd: Add support for constaints --- roles/ntpd/templates/ntpd.conf.j2 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/roles/ntpd/templates/ntpd.conf.j2 b/roles/ntpd/templates/ntpd.conf.j2 index 8802991..a1191f3 100644 --- a/roles/ntpd/templates/ntpd.conf.j2 +++ b/roles/ntpd/templates/ntpd.conf.j2 @@ -4,6 +4,15 @@ listen on {{ listen }} {% endfor %} +{% endif %} +{% if ntpd_constraints is defined %} +# constraints +constraint from {% for constraint in ntpd_constraints -%} +{{ '"' + constraint + '"' -}} +{{ ', ' if not loop.last -}} +{% endfor %} + + {% endif %} # remote servers {% for server in ntpd_servers %}