summaryrefslogtreecommitdiff
path: root/data/templates/ntp/ntpd.conf.tmpl
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-04-13 22:52:36 +0200
committerChristian Poessinger <christian@poessinger.com>2022-04-13 22:52:36 +0200
commit24f136fe08fb28383be78016c97db236889f621d (patch)
tree6669a9501071b31eefe1f40f49b471c77408bfd5 /data/templates/ntp/ntpd.conf.tmpl
parent7dd2249e43eeae9ae79e3e5d2e9fdac296d0edc0 (diff)
downloadvyos-1x-24f136fe08fb28383be78016c97db236889f621d.tar.gz
vyos-1x-24f136fe08fb28383be78016c97db236889f621d.zip
ntp: T4333: migrate to new vyos_defined Jinja2 test
Diffstat (limited to 'data/templates/ntp/ntpd.conf.tmpl')
-rw-r--r--data/templates/ntp/ntpd.conf.tmpl8
1 files changed, 4 insertions, 4 deletions
diff --git a/data/templates/ntp/ntpd.conf.tmpl b/data/templates/ntp/ntpd.conf.tmpl
index e7afcc16b..3123fdf19 100644
--- a/data/templates/ntp/ntpd.conf.tmpl
+++ b/data/templates/ntp/ntpd.conf.tmpl
@@ -15,17 +15,17 @@ restrict -6 ::1
#
# Configurable section
#
-{% if server is defined and server is not none %}
+{% if server is vyos_defined %}
{% for server, config in server.items() %}
{% set association = 'server' %}
-{% if config.pool is defined %}
+{% if config.pool is vyos_defined %}
{% set association = 'pool' %}
{% endif %}
-{{ association }} {{ server | replace('_', '-') }} iburst {{ 'noselect' if config.noselect is defined }} {{ 'preempt' if config.preempt is defined }} {{ 'prefer' if config.prefer is defined }}
+{{ association }} {{ server | replace('_', '-') }} iburst {{ 'noselect' if config.noselect is vyos_defined }} {{ 'preempt' if config.preempt is vyos_defined }} {{ 'prefer' if config.prefer is vyos_defined }}
{% endfor %}
{% endif %}
-{% if allow_clients is defined and allow_clients.address is defined %}
+{% if allow_clients.address is vyos_defined %}
# Allowed clients configuration
restrict default ignore
{% for address in allow_clients.address %}