Zack Williams | f809afe | 2021-02-11 17:46:12 -0700 | [diff] [blame] | 1 | # 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 Williams | d126d77 | 2022-01-31 23:12:47 -0700 | [diff] [blame] | 9 | {% if ntp_pools %} |
Zack Williams | f809afe | 2021-02-11 17:46:12 -0700 | [diff] [blame] | 10 | # NTP pools to obtain time from |
| 11 | {% for pool in ntp_pools %} |
| 12 | pool {{ pool['name'] }} iburst maxsources {{ pool['count'] }} |
| 13 | {% endfor %} |
Zack Williams | d126d77 | 2022-01-31 23:12:47 -0700 | [diff] [blame] | 14 | {% endif %} |
| 15 | |
| 16 | {% if ntp_servers %} |
| 17 | # Individual NTP servers |
| 18 | {% for ntpserv in ntp_servers %} |
| 19 | server {{ ntpserv['name'] }} iburst trust |
| 20 | {% endfor %} |
| 21 | {% endif %} |
Zack Williams | f809afe | 2021-02-11 17:46:12 -0700 | [diff] [blame] | 22 | |
| 23 | # This directive specify the location of the file containing ID/key pairs for |
| 24 | # NTP authentication. |
| 25 | keyfile {{ chrony_conf_dir }}/chrony.keys |
| 26 | |
| 27 | # This directive specify the file into which chronyd will store the rate |
| 28 | # information. |
| 29 | driftfile /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. |
| 35 | logdir /var/log/chrony |
| 36 | |
| 37 | # Stop bad estimates upsetting machine clock. |
| 38 | maxupdateskew 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. |
| 42 | rtcsync |
| 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. |
| 46 | makestep 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 %} |
| 51 | allow {{ cidr }} |
| 52 | {% endfor %} |
| 53 | {% endif %} |