summaryrefslogtreecommitdiffstats
path: root/roles/ntpserver/templates/chrony.conf.j2
blob: eb1f825fe4a34467b2034b00a7bd4941d8f314fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
{% if is_ntpmaster is defined %}
{% for item in primarylist %}
server {{ item }} iburst
{% endfor %}
{% endif %}

{% if is_ntpmaster is not defined %}
{% for item in masterlist %}
server {{ item }} iburst
{% endfor %}

{% if is_ntpslave is not defined %}
{% for item in slavelist %}
server {{ item }} iburst
{% endfor %}
{% endif %}
{% endif %}

# Ignore stratum in source selection.
stratumweight 0

# Record the rate at which the system clock gains/losses time.
driftfile /var/lib/chrony/drift

# Enable kernel RTC synchronization.
rtcsync

# In first three updates step the system clock instead of slew
# if the adjustment is larger than 1 second.
makestep 1.0 3

# Enable hardware timestamping on all interfaces that support it.
#hwtimestamp *

# Increase the minimum number of selectable sources required to adjust
# the system clock.
#minsources 2
minsources 1

# Allow NTP client access from local network.
#allow 192.168/16
allow

# Listen for commands only on localhost.
bindcmdaddress 127.0.0.1
bindcmdaddress ::1

# Serve time even if not synchronized to any NTP server.
local stratum 10

# Specify file containing keys for NTP authentication.
keyfile /etc/chrony.keys

# Specify the key used as password for chronyc.
commandkey 1

# Generate command key if missing.
generatecommandkey

# Disable logging of client accesses.
#noclientlog

# Send a message to syslog if a clock adjustment is larger than 0.5 seconds.
logchange 0.5

# Get TAI-UTC offset and leap seconds from the system tz database.
leapsectz right/UTC

# Specify directory for log files.
logdir /var/log/chrony

# Select which information is logged.
log measurements statistics tracking