chronyd
is a daemon for synchronisation of the system clock. It can synchronise the clock with NTP servers, reference clocks (e.g. a GPS receiver), and manual input using wristwatch and keyboard via chronyc. It can also operate as an NTPv4 (RFC 5905) server and peer to provide a time service to other computers in the network.
Not able to set time in rhel8 due to bug in rhel8
4.0.0
--- Updated for ansible-core 2.16. Removed support for Ubuntu Xenial and Ubuntu Bionic.3.2.0
--- Added Ubuntu Noble support3.1.3
--- Allow Fedora CoreOS 393.1.2
--- fix checkmode3.1.1
--- bug fix, ansible-lint3.1.0
--- added support for Fedora CoreOS (FCOS 38.x.x.x) but with no tests3.0.1
--- bug fix, ansible-lint3.0.0
--- updated to ansible version 2.122.3.0
--- added RHEL 9 and CentOS Stream 8 support2.2.0
--- added configuration options to use role for ntp server configuration, including leap second smearing2.1.0
--- add ubuntu jammy and removed centos8 support + rettet noe syntax i meta og template2.0.0
--- remove ubuntu xenial support + add rtcsync and allow config1.5.0
--- add support for setting timezone1.4.0
--- add rhel8 and remove trusty+centos61.3.0
--- remove ubuntu precise from testing1.2.1
--- fix lint problem1.2.0
--- added ubuntu focal, 20.041.1.2
--- tested with Ansible 2.9.111.1.1
--- prepare for github1.1.0
--- ensure NTP traffic on port123
, for firewall purposes1.0.2
--- removed unsupported directive for v31.0.1
--- fixed restart when config changes1.0.0
--- initial versionmaster
--- latest development version
This role is limited to
- Ubuntu 24.04 - Noble
- Ubuntu 22.04 - Jammy
- Ubuntu 20.04 - Focal
- CentOS 7
- CentOS Stream 8
- RHEL 8
- RHEL 9
- Fedora CoreOS 38
- Fedora CoreOS 39
chrony_allow_enable
--- enable allow config, defaultfalse
chrony_allow
--- list of IP addresses/networks allowed to connect to chrony, default [127.0.0.1]chrony_disable_ntpd
--- disable the old NTP daemon, defaulttrue
chrony_enable
--- enablechrony
NTP daemon, defaulttrue
chrony_log_enable
--- enable logging, defaultfalse
chrony_log
--- configure logging (requires chrony_logging_enable set to true), defaultmeasurements statistics tracking
chrony_logdir
--- configure log directory (requires chrony_logging_enable set to true), default/var/log/chrony/
chrony_ntp_servers
--- list of NTP servers in use, default['0.pool.ntp.org', '1.pool.ntp.org', '2.pool.ntp.org', '3.pool.ntp.org']
chrony_rtcsync
--- enable kernel synchronization of the real-time clock (RTC), defaultfalse
chrony_smearing
--- enable leap second smearing (should only be used for NTP servers), defaultfalse
chrony_timezone
--- timezone for the system. Runtimedatectl list-timezones
on any systemd system to list available timezones, defaultUTC
None.
- hosts: servers
roles:
- role: chrony
chrony_allow_enable: true
chrony_allow:
- 10.10.10.0/24
- 127.0.0.1
- ::/0
chrony_disable_ntpd: true
chrony_enable: true
chrony_log_enable: true
chrony_log: measurements statistics tracking
chrony_logdir: /var/log/chrony/
chrony_ntp_servers:
- 0.ubuntu.pool.ntp.org
- 1.ubuntu.pool.ntp.org
- 2.ubuntu.pool.ntp.org
- 3.ubuntu.pool.ntp.org
chrony_rtcsync: true
chrony_smearing: true
chrony_timezone: "Europe/Oslo"
NOTICE: Fedora CoreOS is tested manually, but currently no automatic tests are added for FCOS.
cd tests
vagrant up
Run role on all OSes again.
vagrant provision
This uses cluster ssh to work with all vagrant boxes at the same time.
vagrant ssh-config > ~/.ssh/config
cat ~/.ssh/config | grep ^Host | cut -d\ -f2 | xargs cssh
GPLv2
Created 2020 by IT Infrastructure at MET Norway Contactpoint: IT Infrastructure Basis Team