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 initstepslew 30 time.cloudflare.com time.google.com <%= node[:ntp][:servers].join(" ") %>
24 <% if node[:lsb][:release].to_f >= 22.04 -%>
25 # Use NTP sources found in /etc/chrony/sources.d.
26 sourcedir /etc/chrony/sources.d
29 # This directive specify the location of the file containing ID/key pairs for
31 keyfile /etc/chrony/chrony.keys
33 # This directive specify the file into which chronyd will store the rate
35 driftfile /var/lib/chrony/chrony.drift
37 <% if node[:lsb][:release].to_f >= 22.04 -%>
38 # Save NTS keys and cookies.
39 ntsdumpdir /var/lib/chrony
42 # Uncomment the following line to turn logging on.
43 #log tracking measurements statistics
46 logdir /var/log/chrony
48 # Stop bad estimates upsetting machine clock.
51 # This directive enables kernel synchronisation (every 11 minutes) of the
52 # real-time clock. Note that it can’t be used along with the 'rtcfile' directive.
55 <% if node[:virtualization][:role] == "guest" -%>
56 # Allow anytime step on VM guests
59 # Step the system clock instead of slewing it if the adjustment is larger than
60 # one second, but only in the first three clock updates.
64 # Enable leap second slew
68 # Enable hardware timestamps if available