Ansible role to configure the systemd-timesyncd service setting S/NTP and timezone parameters.
- systemd >= 2.9
- systemd-timesyncd.service unit
- dbus
config:
timezone: 'Africa/Libreville'
ntp_servers:
- 0.pool.ntp.org
- 1.pool.ntp.org
- 2.pool.ntp.org
- 3.pool.ntp.org
root_distance_max_sec: 5
poll_interval_max_sec: 2048
poll_interval_min_sec: 32
Also see defaults/main.yml for more information on these parameters.
- Debian-based running systemd-timesyncd (NOTE: systemd on the Redhat family (RHEL/Fedora/CentOs) is not compiled with timesyncd for NTP synchronization and uses chrony instead)
This role will likely fail to succeed in configuring timesyncd
if
the following services are enabled/running on the system.
- ntp/ntpd - reference implementation
- chrony/chronyd
- name: TC2 - Run ansible-systemd-timesyncd role
hosts: localhost
remote_user: root
roles:
- role: ansible-systemd-timesyncd
config:
timezone: 'Africa/Libreville'
Also see tests/ for how tests are run.
- systemd-timesyncd.service
- timesyncd.conf
- timedatectl
- Time Synchronization with NTP and systemd
- systemd/timesyncd.c
Apache License, v2.0
Shalom Bhooshi