2017-11-30 14:28:28 +00:00
|
|
|
### {{ ansible_managed }}
|
|
|
|
|
|
|
|
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
|
|
|
|
|
|
|
|
driftfile /var/lib/ntp/ntp.drift
|
|
|
|
|
2020-12-03 13:44:52 +00:00
|
|
|
# Leap seconds definition provided by tzdata
|
|
|
|
leapfile /usr/share/zoneinfo/leap-seconds.list
|
|
|
|
|
|
|
|
# Enable statistics if you want statistics to be logged.
|
2017-11-30 14:28:28 +00:00
|
|
|
statsdir /var/log/ntpstats/
|
2020-12-03 13:44:52 +00:00
|
|
|
|
2017-11-30 14:28:28 +00:00
|
|
|
statistics loopstats peerstats clockstats
|
|
|
|
filegen loopstats file loopstats type day enable
|
|
|
|
filegen peerstats file peerstats type day enable
|
|
|
|
filegen clockstats file clockstats type day enable
|
|
|
|
|
2020-12-02 21:07:40 +00:00
|
|
|
# NTP servers
|
2020-12-02 20:55:22 +00:00
|
|
|
{% for server in timesync_servers|default(["pool.ntp.org"]) %}server {{ server }} iburst
|
2017-11-30 14:28:28 +00:00
|
|
|
{% endfor %}
|
|
|
|
|
2020-12-02 21:07:40 +00:00
|
|
|
# NTP pools
|
2020-12-03 13:44:52 +00:00
|
|
|
{% for pool in timesync_pools|default(["0.pool.ntp.org"]) %}pool {{ pool }} iburst
|
2020-12-02 21:07:40 +00:00
|
|
|
{% endfor %}
|
2017-11-30 14:28:28 +00:00
|
|
|
|
|
|
|
# Access control configuration
|
|
|
|
# By default, exchange time with everybody, but don't allow configuration.
|
2020-12-03 13:44:52 +00:00
|
|
|
restrict -4 default kod notrap nomodify nopeer noquery limited
|
|
|
|
restrict -6 default kod notrap nomodify nopeer noquery limited
|
|
|
|
|
2017-11-30 14:28:28 +00:00
|
|
|
# Local users may interrogate the ntp server more closely.
|
|
|
|
restrict 127.0.0.1
|
|
|
|
restrict ::1
|
2020-12-03 13:44:52 +00:00
|
|
|
restrict -6 ::1
|
|
|
|
|
|
|
|
# Needed for adding pool entries
|
|
|
|
restrict source notrap nomodify noquery
|
|
|
|
|
|
|
|
# Allow to query/monitor the daemon
|
|
|
|
#enable mode7
|
2017-11-30 14:28:28 +00:00
|
|
|
|