ansible/roles/ntp/templates/chrony.conf.j2
Jan-Jonas Sämann f5cc5cea9c
Some checks failed
continuous-integration/drone/push Build is failing
Use chrony to lock kvm virtualized vm to host rtc
Chrony uses PHC via VirtIO PTP on KVM to sync the virtial mashines time to
the hosts RTC within nanoseconds. Ntpd is still used for anything else
not virtualized on kvm.
2020-09-04 18:36:50 +02:00

28 lines
542 B
Django/Jinja

# {{ ansible_managed }}
{% if not (load_ptp_kvm is skipped) %}
refclock PHC /dev/ptp0 poll 2
{% elif ntp_servers is defined %}
{% for srv in ntp_servers %}
server {{ srv }} iburst
{% endfor %}
{% else %}
pool 2.debian.pool.ntp.org iburst
{% endif %}
{% if ntp_peers is defined %}
{% for peer in ntp_peers %}
peer {{ peer }}
{% endfor %}
{% endif %}
keyfile /etc/chrony/chrony.keys
driftfile /var/lib/chrony/chrony.drift
logdir /var/log/chrony
maxupdateskew 100.0
rtcsync
makestep 1 3
# Do not allow chronyc for security reasons
cmdport 0