From 14048171f8e5273b1b82c6d2ed5675a7d1a6eeb6 Mon Sep 17 00:00:00 2001 From: Ryan Harper Date: Tue, 16 Jul 2019 20:57:32 +0000 Subject: templates/ntp.conf.debian.tmpl: fix missing newline for pools MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- templates/ntp.conf.debian.tmpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'templates/ntp.conf.debian.tmpl') 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: -{% if pools -%}# pools{% endif %} +{% if pools %}# pools +{% endif %} {% for pool in pools -%} pool {{pool}} iburst {% endfor %} -- cgit v1.2.3