-
Notifications
You must be signed in to change notification settings - Fork 820
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ntp): Fix AlmaLinux OS and CloudLinux OS support (#5235)
- Add missing templates for chrony and ntp configuration files. - AlmaLinux OS is binary compatible with RHEL and CloudLinux OS based on AlmaLinux OS. So, let's use distro-specific configurations from rhel. Signed-off-by: Elkhan Mammadli <elkhan.mammadli@protonmail.com>
- Loading branch information
Showing
6 changed files
with
234 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
## template:jinja | ||
# Use public servers from the pool.ntp.org project. | ||
# Please consider joining the pool (http://www.pool.ntp.org/join.html). | ||
{% if pools %}# pools | ||
{% endif %} | ||
{% for pool in pools -%} | ||
pool {{pool}} iburst | ||
{% endfor %} | ||
{%- if servers %}# servers | ||
{% endif %} | ||
{% for server in servers -%} | ||
server {{server}} iburst | ||
{% endfor %} | ||
{% for peer in peers -%} | ||
peer {{peer}} | ||
{% endfor %} | ||
{% for a in allow -%} | ||
allow {{a}} | ||
{% endfor %} | ||
|
||
# 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 | ||
|
||
# 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 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 | ||
|
||
# Specify file containing keys for NTP authentication. | ||
#keyfile /etc/chrony.keys | ||
|
||
# Specify directory for log files. | ||
logdir /var/log/chrony | ||
|
||
# Select which information is logged. | ||
#log measurements statistics tracking |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
## template:jinja | ||
# Use public servers from the pool.ntp.org project. | ||
# Please consider joining the pool (http://www.pool.ntp.org/join.html). | ||
{% if pools %}# pools | ||
{% endif %} | ||
{% for pool in pools -%} | ||
pool {{pool}} iburst | ||
{% endfor %} | ||
{%- if servers %}# servers | ||
{% endif %} | ||
{% for server in servers -%} | ||
server {{server}} iburst | ||
{% endfor %} | ||
{% for peer in peers -%} | ||
peer {{peer}} | ||
{% endfor %} | ||
{% for a in allow -%} | ||
allow {{a}} | ||
{% endfor %} | ||
|
||
# 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 | ||
|
||
# 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 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 | ||
|
||
# Specify file containing keys for NTP authentication. | ||
#keyfile /etc/chrony.keys | ||
|
||
# Specify directory for log files. | ||
logdir /var/log/chrony | ||
|
||
# Select which information is logged. | ||
#log measurements statistics tracking |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
## template:jinja | ||
|
||
# For more information about this file, see the man pages | ||
# ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5). | ||
|
||
driftfile /var/lib/ntp/drift | ||
|
||
# Permit time synchronization with our time source, but do not | ||
# permit the source to query or modify the service on this system. | ||
restrict default kod nomodify notrap nopeer noquery | ||
restrict -6 default kod nomodify notrap nopeer noquery | ||
|
||
# Permit all access over the loopback interface. This could | ||
# be tightened as well, but to do so would effect some of | ||
# the administrative functions. | ||
restrict 127.0.0.1 | ||
restrict -6 ::1 | ||
|
||
# Hosts on local network are less restricted. | ||
#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap | ||
|
||
# Use public servers from the pool.ntp.org project. | ||
# Please consider joining the pool (http://www.pool.ntp.org/join.html). | ||
{% if pools %}# pools | ||
{% endif %} | ||
{% for pool in pools -%} | ||
pool {{pool}} iburst | ||
{% endfor %} | ||
{%- if servers %}# servers | ||
{% endif %} | ||
{% for server in servers -%} | ||
server {{server}} iburst | ||
{% endfor %} | ||
{% for peer in peers -%} | ||
peer {{peer}} | ||
{% endfor %} | ||
|
||
#broadcast 192.168.1.255 autokey # broadcast server | ||
#broadcastclient # broadcast client | ||
#broadcast 224.0.1.1 autokey # multicast server | ||
#multicastclient 224.0.1.1 # multicast client | ||
#manycastserver 239.255.254.254 # manycast server | ||
#manycastclient 239.255.254.254 autokey # manycast client | ||
|
||
# Enable public key cryptography. | ||
#crypto | ||
|
||
includefile /etc/ntp/crypto/pw | ||
|
||
# Key file containing the keys and key identifiers used when operating | ||
# with symmetric key cryptography. | ||
keys /etc/ntp/keys | ||
|
||
# Specify the key identifiers which are trusted. | ||
#trustedkey 4 8 42 | ||
|
||
# Specify the key identifier to use with the ntpdc utility. | ||
#requestkey 8 | ||
|
||
# Specify the key identifier to use with the ntpq utility. | ||
#controlkey 8 | ||
|
||
# Enable writing of statistics records. | ||
#statistics clockstats cryptostats loopstats peerstats |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
## template:jinja | ||
|
||
# For more information about this file, see the man pages | ||
# ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5). | ||
|
||
driftfile /var/lib/ntp/drift | ||
|
||
# Permit time synchronization with our time source, but do not | ||
# permit the source to query or modify the service on this system. | ||
restrict default kod nomodify notrap nopeer noquery | ||
restrict -6 default kod nomodify notrap nopeer noquery | ||
|
||
# Permit all access over the loopback interface. This could | ||
# be tightened as well, but to do so would effect some of | ||
# the administrative functions. | ||
restrict 127.0.0.1 | ||
restrict -6 ::1 | ||
|
||
# Hosts on local network are less restricted. | ||
#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap | ||
|
||
# Use public servers from the pool.ntp.org project. | ||
# Please consider joining the pool (http://www.pool.ntp.org/join.html). | ||
{% if pools %}# pools | ||
{% endif %} | ||
{% for pool in pools -%} | ||
pool {{pool}} iburst | ||
{% endfor %} | ||
{%- if servers %}# servers | ||
{% endif %} | ||
{% for server in servers -%} | ||
server {{server}} iburst | ||
{% endfor %} | ||
{% for peer in peers -%} | ||
peer {{peer}} | ||
{% endfor %} | ||
|
||
#broadcast 192.168.1.255 autokey # broadcast server | ||
#broadcastclient # broadcast client | ||
#broadcast 224.0.1.1 autokey # multicast server | ||
#multicastclient 224.0.1.1 # multicast client | ||
#manycastserver 239.255.254.254 # manycast server | ||
#manycastclient 239.255.254.254 autokey # manycast client | ||
|
||
# Enable public key cryptography. | ||
#crypto | ||
|
||
includefile /etc/ntp/crypto/pw | ||
|
||
# Key file containing the keys and key identifiers used when operating | ||
# with symmetric key cryptography. | ||
keys /etc/ntp/keys | ||
|
||
# Specify the key identifiers which are trusted. | ||
#trustedkey 4 8 42 | ||
|
||
# Specify the key identifier to use with the ntpdc utility. | ||
#requestkey 8 | ||
|
||
# Specify the key identifier to use with the ntpq utility. | ||
#controlkey 8 | ||
|
||
# Enable writing of statistics records. | ||
#statistics clockstats cryptostats loopstats peerstats |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,6 +102,7 @@ landon912 | |
ld9379435 | ||
licebmi | ||
linitio | ||
LKHN | ||
lkundrak | ||
lucasmoura | ||
lucendio | ||
|