summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorRyan Harper <ryan.harper@canonical.com>2019-07-16 20:57:32 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2019-07-16 20:57:32 +0000
commit14048171f8e5273b1b82c6d2ed5675a7d1a6eeb6 (patch)
tree34fd0865650c5face2e2db451df57704b2abc817 /templates
parenta785462959e8746cc16609a159fee33dedd713b1 (diff)
downloadvyos-cloud-init-14048171f8e5273b1b82c6d2ed5675a7d1a6eeb6.tar.gz
vyos-cloud-init-14048171f8e5273b1b82c6d2ed5675a7d1a6eeb6.zip
templates/ntp.conf.debian.tmpl: fix missing newline for pools
The debian ntp.conf template did not contain a newline for the comment used to mark the rendered ntp pools configured. This resulted in an invalid line: '# poolspool 0.int.pool.ntp.org iburst' rather than: '# pools  pool 0.int.pool.ntp.org iburst' This patch fixes the template and updates the unittest to verify that the rendered templates puts servers and pools at the beginning of a line. LP: #1836598
Diffstat (limited to 'templates')
-rw-r--r--templates/ntp.conf.debian.tmpl3
1 files changed, 2 insertions, 1 deletions
diff --git a/templates/ntp.conf.debian.tmpl b/templates/ntp.conf.debian.tmpl
index 3f07eeaa..affe983d 100644
--- a/templates/ntp.conf.debian.tmpl
+++ b/templates/ntp.conf.debian.tmpl
@@ -19,7 +19,8 @@ filegen clockstats file clockstats type day enable
# pool.ntp.org maps to about 1000 low-stratum NTP servers. Your server will
# pick a different set every time it starts up. Please consider joining the
# pool: <http://www.pool.ntp.org/join.html>
-{% if pools -%}# pools{% endif %}
+{% if pools %}# pools
+{% endif %}
{% for pool in pools -%}
pool {{pool}} iburst
{% endfor %}