1 # DO NOT EDIT - This file is being maintained by Chef
3 <% if node[:lsb][:release].to_f >= 22.04 -%>
4 # Include configuration files found in /etc/chrony/conf.d.
5 confdir /etc/chrony/conf.d
9 <% node[:ntp][:servers].each do |server| -%>
10 pool <%= server %> iburst
12 # Add additional non-pool NTP servers
13 # pool.ntp.org can sometimes be aggressive with KoD
14 pool time.cloudflare.com iburst
15 server time1.google.com iburst
16 server time2.google.com iburst
17 server time3.google.com iburst
18 server time4.google.com iburst
20 # Allow local queries for monitoring
24 # Run an initial NTP sync on daemon startup
25 # Use a few IPs here to workaround DNSSEC failure if time is wrong: https://github.com/openstreetmap/operations/issues/654
26 initstepslew 30 216.239.35.0 216.239.35.4 216.239.35.8 216.239.35.12 time.google.com time.cloudflare.com <%= node[:ntp][:servers].join(" ") %>
28 <% if node[:lsb][:release].to_f >= 22.04 -%>
29 # Use NTP sources found in /etc/chrony/sources.d.
30 sourcedir /etc/chrony/sources.d
33 # This directive specify the location of the file containing ID/key pairs for
35 keyfile /etc/chrony/chrony.keys
37 # This directive specify the file into which chronyd will store the rate
39 driftfile /var/lib/chrony/chrony.drift
41 <% if node[:lsb][:release].to_f >= 22.04 -%>
42 # Save NTS keys and cookies.
43 ntsdumpdir /var/lib/chrony
46 # Uncomment the following line to turn logging on.
47 #log tracking measurements statistics
50 logdir /var/log/chrony
52 # Stop bad estimates upsetting machine clock.
55 # This directive enables kernel synchronisation (every 11 minutes) of the
56 # real-time clock. Note that it can’t be used along with the 'rtcfile' directive.
59 <% if node[:virtualization][:role] == "guest" -%>
60 # Allow anytime step on VM guests
63 # Step the system clock instead of slewing it if the adjustment is larger than
64 # one second, but only in the first three clock updates.
68 # Enable leap second slew
72 # Enable hardware timestamps if available