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 pool time.google.com iburst
17 # Allow local queries for monitoring
21 # Run an initial NTP sync on daemon startup
22 # Use a few IPs here to workaround DNSSEC failure if time is wrong: https://github.com/openstreetmap/operations/issues/654
23 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(" ") %>
25 <% if node[:lsb][:release].to_f >= 22.04 -%>
26 # Use NTP sources found in /etc/chrony/sources.d.
27 sourcedir /etc/chrony/sources.d
30 # This directive specify the location of the file containing ID/key pairs for
32 keyfile /etc/chrony/chrony.keys
34 # This directive specify the file into which chronyd will store the rate
36 driftfile /var/lib/chrony/chrony.drift
38 <% if node[:lsb][:release].to_f >= 22.04 -%>
39 # Save NTS keys and cookies.
40 ntsdumpdir /var/lib/chrony
43 # Uncomment the following line to turn logging on.
44 #log tracking measurements statistics
47 logdir /var/log/chrony
49 # Stop bad estimates upsetting machine clock.
52 # This directive enables kernel synchronisation (every 11 minutes) of the
53 # real-time clock. Note that it can’t be used along with the 'rtcfile' directive.
56 <% if node[:virtualization][:role] == "guest" -%>
57 # Allow anytime step on VM guests
60 # Step the system clock instead of slewing it if the adjustment is larger than
61 # one second, but only in the first three clock updates.
65 # Enable leap second slew
69 # Enable hardware timestamps if available