summaryrefslogtreecommitdiff
path: root/roles/core/ntp/templates/openntpd.conf.j2
blob: fd43f816aa58ac6074ea3db34834a5a4033a0bc6 (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
{% if ntp_refclocks is defined %}
### Sensors

{%   for refclock in ntp_refclocks %}
sensor {{ refclock.device }}{% if 'options' in refclock %} {{ refclock.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 %}
servers {{ pool.name }}{% if 'options' in pool %} {{ pool.options }}{% endif %}{{ '' }}
{%     endfor %}
{%   endif %}
{% endif %}
{% if ntp_server is defined %}


### Server

listen on {{ ntp_server.bind | default('*') }}
{% endif %}