blob: e404da18ea83d3bc19c5b4cae7a1b718989b5e0c (
plain) (
blame)
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
|
### Global options
cmdport 0
keyfile /etc/chrony/chrony.keys
driftfile /var/lib/chrony/chrony.drift
logdir /var/log/chrony
maxupdateskew 100.0
rtcsync
makestep 1 3
{% if ntp_hwtimestamp_interfaces is defined %}
{% for interface in ntp_hwtimestamp_interfaces %}
hwtimestamp {{ interface.name }}{% if 'options' in interface %} {{ interface.options }}{% endif %}{{ '' }}
{% endfor %}
{% endif %}
{% if ntp_client is defined %}
### Client
{% if 'servers' in ntp_client %}
{% for server in ntp_client.servers %}
server {{ server.name }}{% if 'options' in server %} {{ server.options }}{% endif %}{{ '' }}
{% endfor %}
{% endif %}
{% if 'pools' in ntp_client %}
{% for pool in ntp_client.pools %}
pool {{ pool.name }}{% if 'options' in pool %} {{ pool.options }}{% endif %}{{ '' }}
{% endfor %}
{% endif %}
{% if 'peers' in ntp_client %}
{% for peer in ntp_client.peers %}
peer {{ peer.name }}{% if 'options' in peer %} {{ peer.options }}{% endif %}{{ '' }}
{% endfor %}
{% endif %}
{% endif %}
{% if ntp_server is defined %}
### Server
{% for rule in ntp_server.allow | default([]) %}
allow {{ rule }}
{% endfor %}
{% for rule in ntp_server.deny | default([]) %}
deny {{ rule }}
{% endfor %}
{% if 'bind' in ntp_server %}
bindaddress {{ ntp_server.bind }}
{% endif %}
{% if 'port' in ntp_server %}
port {{ ntp_server.port }}
{% endif %}
{% endif %}
|