I’m trying to get NTP time syncing to work on an Ubuntu system and it seems to work, but I’m not sure.
I’m adding this to trellis/galaxy.yml
:
- name: ntp
src: geerlingguy.ntp
version: 2.3.1
And this to trellis/group_vars/all/main.yml
:
ntp_timezone: Europe/Amsterdam
ntp_manage_config: true
ntp_servers:
- "0.nl.pool.ntp.org iburst"
- "1.nl.pool.ntp.org iburst"
- "2.nl.pool.ntp.org iburst"
- "3.nl.pool.ntp.org iburst"
After reprovision and server reboot, my output of ntpq -p
is:
remote refid st t when poll reach delay offset jitter
==============================================================================
0.nl.pool.ntp.o .POOL. 16 p - 64 0 0.000 0.000 0.000
1.nl.pool.ntp.o .POOL. 16 p - 64 0 0.000 0.000 0.000
2.nl.pool.ntp.o .POOL. 16 p - 64 0 0.000 0.000 0.000
3.nl.pool.ntp.o .POOL. 16 p - 64 0 0.000 0.000 0.000
+154.51.12.215 129.134.28.123 2 u 359 1024 377 3.296 0.074 0.141
-ntppool1.time.n .TMNL. 1 u 509 1024 377 5.317 0.005 4.280
*ntppool1.time.n .TMNL. 1 u 537 1024 377 5.734 0.093 0.166
+beetjevreemd.nl .PPS0. 1 u 206 1024 377 4.823 0.199 0.116
-nts1.time.nl .TMNL. 1 u 608 1024 377 5.840 -0.214 0.736
-ntp4.bit.nl .PPS. 1 u 420 1024 377 3.446 -0.049 0.116
Which tells me ntp is synced with a server as indicated by the asterisk.
However, the output of timedatectl
says:
Local time: Thu 2022-10-13 13:23:36 CEST
Universal time: Thu 2022-10-13 11:23:36 UTC
RTC time: Thu 2022-10-13 11:23:37
Time zone: Europe/Amsterdam (CEST, +0200)
System clock synchronized: yes
NTP service: n/a
RTC in local TZ: no
Almost all looks well (including my defined timezone), except for the fact that it says there’s no ntp service available (NTP service: n/a
).
Can someone shine some light on why this is and point me in a direction to try and fix it?