Files
confdroid_ntp/templates/chrony.conf.erb

122 lines
3.4 KiB
Plaintext
Raw Normal View History

2026-10-02 12:57:28 +02:00
################################################################################
### chrony.conf created by Puppet, manual changes will be overwritten ###
2026-10-02 13:32:06 +02:00
################################################################################
### original chrony.conf file can be found at https://3for.me/2t0an ###
################################################################################
2026-10-02 14:56:10 +02:00
<% if @fqdn == @cy_server_fqdn -%>
2026-10-02 14:53:12 +02:00
# This is a time server configuration file
2026-10-02 15:05:29 +02:00
# Use public servers from the pool.ntp.org project.
<% @cy_conf_servers.each do |this_server| -%>
pool <%= this_server %> iburst
2026-10-02 15:09:48 +02:00
<% end -%>
2026-10-02 15:05:29 +02:00
# Use NTP servers from DHCP.
sourcedir /run/chrony-dhcp
# Record the rate at which the system clock gains/losses time.
driftfile /var/lib/chrony/drift
# Allow the system clock to be stepped in the first three updates
# if its offset is larger than 1 second.
makestep 1.0 3
2026-10-02 15:37:23 +02:00
# Enable kernel synchronization of the real-time clock (RTC).
rtcsync
# Enable hardware timestamping on all interfaces that support it.
hwtimestamp *
# Increase the minimum number of selectable sources required to adjust
# the system clock.
minsources <%= @cy_min_sources %>
# Allow NTP client access from local network.
allow <%= @cy_client_allow %>
# Serve time even if not synchronized to a time source.
local stratum 10
# Require authentication (nts or key option) for all NTP sources.
#authselectmode require
# Specify file containing keys for NTP authentication.
keyfile /etc/chrony.keys
# Save NTS keys and cookies.
ntsdumpdir /var/lib/chrony
# Insert/delete leap seconds by slewing instead of stepping.
2026-10-02 15:48:36 +02:00
leapsecmode <%= @cy_leapsec_mode %>
2026-10-02 15:37:23 +02:00
# Get TAI-UTC offset and leap seconds from the system tz database.
2026-10-02 15:48:36 +02:00
leapsectz <%= @cy_leapsectz %>
2026-10-02 15:37:23 +02:00
# Specify directory for log files.
logdir /var/log/chrony
# Select which information is logged.
2026-10-02 15:48:36 +02:00
log <%= @cy_loginfo %>
2026-10-02 15:37:23 +02:00
2026-10-02 15:09:48 +02:00
<% end %>
2026-10-02 14:53:12 +02:00
2026-10-02 14:43:28 +02:00
<% if @fqdn != @cy_server_fqdn -%>
# This is a time client configuration file
<% if @cy_use_lan_server -%>
2026-10-02 15:05:29 +02:00
server <%= @cy_server_fqdn %> iburst
<% else -%>
# Use public servers from the pool.ntp.org project.
<% @cy_conf_servers.each do |this_server| -%>
server <%= this_server %> iburst
<% end -%>
2026-10-02 15:05:29 +02:00
# Use NTP servers from DHCP.
sourcedir /run/chrony-dhcp
# Record the rate at which the system clock gains/losses time.
driftfile /var/lib/chrony/drift
# Allow the system clock to be stepped in the first three updates
# if its offset is larger than 1 second.
makestep 1.0 3
2026-10-02 15:37:23 +02:00
# Enable kernel synchronization of the real-time clock (RTC).
rtcsync
# Enable hardware timestamping on all interfaces that support it.
hwtimestamp *
# Increase the minimum number of selectable sources required to adjust
# the system clock. Primarily for servers.
#minsources 2
# Allow NTP client access from local network.
#allow 192.168.0.0/16
# Serve time even if not synchronized to a time source.
#local stratum 10
# Require authentication (nts or key option) for all NTP sources.
#authselectmode require
# Specify file containing keys for NTP authentication.
keyfile /etc/chrony.keys
# Save NTS keys and cookies.
ntsdumpdir /var/lib/chrony
# Insert/delete leap seconds by slewing instead of stepping.
2026-10-02 15:48:36 +02:00
leapsecmode <%= @cy_leapsec_mode %>
2026-10-02 15:37:23 +02:00
# Get TAI-UTC offset and leap seconds from the system tz database.
2026-10-02 15:48:36 +02:00
leapsectz <%= @cy_leapsectz %>
2026-10-02 15:37:23 +02:00
# Specify directory for log files.
logdir /var/log/chrony
# Select which information is logged.
2026-10-02 15:48:36 +02:00
log <%= @cy_loginfo %>
2026-10-02 15:37:23 +02:00
2026-10-02 14:45:12 +02:00
<% end %>