From eac3e56b1d305fc1c7f02e0c12a80ad8e047bcf3 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Thu, 14 Oct 2021 19:27:57 +0200 Subject: [PATCH] TT#144703 Restore support for ntp We add optional support for ntpd, as some customers have demanded it back. While preserving timesyncd as the default. Change-Id: Ib954ee73e21b572beb9655c9ce471702e03f7142 --- templates/400_process-debian.yaml.tt2 | 5 ++++- templates/500_init-daemons-dabian.yaml.tt2 | 8 ++++++-- templates/820_network-ports-debian.yaml.tt2 | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/templates/400_process-debian.yaml.tt2 b/templates/400_process-debian.yaml.tt2 index c578111..de9107b 100644 --- a/templates/400_process-debian.yaml.tt2 +++ b/templates/400_process-debian.yaml.tt2 @@ -14,6 +14,9 @@ process: mariadbd: running: true + ntpd: + running: [% ntp.backend == 'ntpd' ? 'true' : 'false ' %] + redis-server: running: true @@ -26,7 +29,7 @@ process: # XXX: We need to truncate the process name to 15 characters (from the # actual "systemd-timesyncd"), which is the size of the comm string in Linux. systemd-timesyn: - running: true + running: [% ntp.backend == 'timesyncd' ? 'true' : 'false ' %] systemd-udevd: running: true diff --git a/templates/500_init-daemons-dabian.yaml.tt2 b/templates/500_init-daemons-dabian.yaml.tt2 index 8d0bc67..c5fd500 100644 --- a/templates/500_init-daemons-dabian.yaml.tt2 +++ b/templates/500_init-daemons-dabian.yaml.tt2 @@ -55,6 +55,10 @@ service: enabled: true running: true + ntp.service: + enabled: [% ntp.backend == 'ntpd' ? 'true' : 'false ' %] + running: [% ntp.backend == 'ntpd' ? 'true' : 'false ' %] + rsyslog.service: enabled: true running: true @@ -88,8 +92,8 @@ service: running: true systemd-timesyncd.service: - enabled: true - running: true + enabled: [% ntp.backend == 'timesyncd' ? 'true' : 'false ' %] + running: [% ntp.backend == 'timesyncd' ? 'true' : 'false ' %] telegraf.service: enabled: false diff --git a/templates/820_network-ports-debian.yaml.tt2 b/templates/820_network-ports-debian.yaml.tt2 index 9f0b932..88f22c8 100644 --- a/templates/820_network-ports-debian.yaml.tt2 +++ b/templates/820_network-ports-debian.yaml.tt2 @@ -11,7 +11,7 @@ port: # NTP (systemd-timesyncd does not listen) udp:123: - listening: false + listening: [% ntp.backend == 'timesyncd' ? 'false' : 'true ' %] # Check for a closed port, nothing there. tcp:7777: