blob: c1c4a3aeab90a12afd9f158aa477db1cc04f0685 [file] [log] [blame]
Zack Williamsf809afe2021-02-11 17:46:12 -07001# SPDX-FileCopyrightText: © 2021 Open Networking Foundation <support@opennetworking.org>
2# SPDX-License-Identifier: Apache-2.0
3
4# Welcome to the chrony configuration file. See chrony.conf(5) for more
5# information about usuable directives.
6
7# this is derived from the Ubuntu 18.04 default file, with modifications
8
Zack Williamsd126d772022-01-31 23:12:47 -07009{% if ntp_pools %}
Zack Williamsf809afe2021-02-11 17:46:12 -070010# NTP pools to obtain time from
11{% for pool in ntp_pools %}
12pool {{ pool['name'] }} iburst maxsources {{ pool['count'] }}
13{% endfor %}
Zack Williamsd126d772022-01-31 23:12:47 -070014{% endif %}
15
16{% if ntp_servers %}
17# Individual NTP servers
18{% for ntpserv in ntp_servers %}
19server {{ ntpserv['name'] }} iburst trust
20{% endfor %}
21{% endif %}
Zack Williamsf809afe2021-02-11 17:46:12 -070022
23# This directive specify the location of the file containing ID/key pairs for
24# NTP authentication.
25keyfile {{ chrony_conf_dir }}/chrony.keys
26
27# This directive specify the file into which chronyd will store the rate
28# information.
29driftfile /var/lib/chrony/chrony.drift
30
31# Uncomment the following line to turn logging on.
32#log tracking measurements statistics
33
34# Log files location.
35logdir /var/log/chrony
36
37# Stop bad estimates upsetting machine clock.
38maxupdateskew 100.0
39
40# This directive enables kernel synchronisation (every 11 minutes) of the
41# real-time clock. Note that it can’t be used along with the 'rtcfile' directive.
42rtcsync
43
44# Step the system clock instead of slewing it if the adjustment is larger than
45# one second, but only in the first three clock updates.
46makestep 1 3
47
48{% if ntp_client_allow %}
49# Function as an NTP server and allow access from these networks
50{% for cidr in ntp_client_allow %}
51allow {{ cidr }}
52{% endfor %}
53{% endif %}