]> git.openstreetmap.org Git - chef.git/blob - cookbooks/ntp/templates/default/chrony.conf.erb
Tweak some tile sandboxes
[chef.git] / cookbooks / ntp / templates / default / chrony.conf.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
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
6 <% end -%>
7
8 # Servers
9 <% node[:ntp][:servers].each do |server| -%>
10 pool <%= server %> iburst
11 <% end -%>
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
16
17 # Allow local queries for monitoring
18 allow 127.0.0.1/32
19 allow ::1/128
20
21 # Run an initial NTP sync on daemon startup
22 initstepslew 30 time.cloudflare.com time.google.com <%= node[:ntp][:servers].join(" ") %>
23
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
27 <% end -%>
28
29 # This directive specify the location of the file containing ID/key pairs for
30 # NTP authentication.
31 keyfile /etc/chrony/chrony.keys
32
33 # This directive specify the file into which chronyd will store the rate
34 # information.
35 driftfile /var/lib/chrony/chrony.drift
36
37 <% if node[:lsb][:release].to_f >= 22.04 -%>
38 # Save NTS keys and cookies.
39 ntsdumpdir /var/lib/chrony
40 <% end -%>
41
42 # Uncomment the following line to turn logging on.
43 #log tracking measurements statistics
44
45 # Log files location.
46 logdir /var/log/chrony
47
48 # Stop bad estimates upsetting machine clock.
49 maxupdateskew 100.0
50
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.
53 rtcsync
54
55 <% if node[:virtualization][:role] == "guest" -%>
56 # Allow anytime step on VM guests
57 makestep 1 -1
58 <% else -%>
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.
61 makestep 1 3
62 <% end -%>
63
64 # Enable leap second slew
65 leapsecmode slew
66 maxslewrate 1000
67
68 # Enable hardware timestamps if available
69 hwtimestamp *