From a09bbd6132d108d44d51b97ff83c6d079a2070df Mon Sep 17 00:00:00 2001 From: 12ww1160 <12ww1160@confdroid.com> Date: Fri, 2 Oct 2026 15:05:29 +0200 Subject: [PATCH] OP#830 add config steps --- templates/chrony.conf.erb | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/templates/chrony.conf.erb b/templates/chrony.conf.erb index 5889ce2..d6a12e0 100644 --- a/templates/chrony.conf.erb +++ b/templates/chrony.conf.erb @@ -6,11 +6,35 @@ <% if @fqdn == @cy_server_fqdn -%> # This is a time server configuration file -#<% @cy_conf_servers.each do |this_server| -%> -#pool <%= this_server %> iburst +# Use public servers from the pool.ntp.org project. +<% @cy_conf_servers.each do |this_server| -%> +pool <%= this_server %> iburst + +# Use NTP servers from DHCP. +sourcedir /run/chrony-dhcp + +# Record the rate at which the system clock gains/losses time. +driftfile /var/lib/chrony/drift + +# Allow the system clock to be stepped in the first three updates +# if its offset is larger than 1 second. +makestep 1.0 3 + <% end end -%> <% if @fqdn != @cy_server_fqdn -%> # This is a time client configuration file +server <%= @cy_server_fqdn %> iburst + +# Use NTP servers from DHCP. +sourcedir /run/chrony-dhcp + +# Record the rate at which the system clock gains/losses time. +driftfile /var/lib/chrony/drift + +# Allow the system clock to be stepped in the first three updates +# if its offset is larger than 1 second. +makestep 1.0 3 + <% end %>