Files
mesh-catalog/modules/time-sync/module.json
T
jochen 21d8a7f6b4 time-sync: one time daemon, timesyncd, with its servers declared
Three machines ran timesyncd and one ran ntpd. The module declares
timesyncd running with a 50-mesh.conf drop-in (European pool) and ntp absent
(hq ADR 0180). A run-once step of its Go binary stops and disables ntpd first
and takes out only dangling wants-links, so removing the package leaves no
enabled unit pointing at nothing. A provider's drop-in sorting after the
mesh's still wins and is reported, not removed. Tools: time_sync_status,
_servers, _sync_now (to-be 42 Phase 1).
2026-10-04 12:50:20 +02:00

77 lines
3.0 KiB
JSON

{
"module": "time-sync",
"version": "1",
"capabilities": [
"package-manager",
"service-manager"
],
"tools": [
"time_sync_status",
"time_sync_servers",
"time_sync_sync_now"
],
"resources": [
{
"id": "servers",
"type": "file",
"path": "/etc/systemd/timesyncd.conf.d/50-mesh.conf",
"mode": "0644",
"content": "# The mesh's (module time-sync, novox/hq to-be 42): the servers timesyncd asks. Written whole at\n# every push. A drop-in whose name sorts after this one wins over it: a hosting provider's own\n# servers are kept that way where the machine was found with them.\n[Time]\nNTP=0.europe.pool.ntp.org 1.europe.pool.ntp.org 2.europe.pool.ntp.org 3.europe.pool.ntp.org\nFallbackNTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org\n",
"names-on-purpose": {
"0.europe.pool.ntp.org": "the public NTP pool's European zone: the world's time service, the same for every installation; nearest to every machine of this mesh",
"1.europe.pool.ntp.org": "the public NTP pool's European zone: the world's time service, the same for every installation; nearest to every machine of this mesh",
"2.europe.pool.ntp.org": "the public NTP pool's European zone: the world's time service, the same for every installation; nearest to every machine of this mesh",
"3.europe.pool.ntp.org": "the public NTP pool's European zone: the world's time service, the same for every installation; nearest to every machine of this mesh",
"0.arch.pool.ntp.org": "the distribution's own NTP pool, timesyncd's compiled-in fallback, stated so the drop-in says the whole of what timesyncd uses",
"1.arch.pool.ntp.org": "the distribution's own NTP pool, timesyncd's compiled-in fallback, stated so the drop-in says the whole of what timesyncd uses",
"2.arch.pool.ntp.org": "the distribution's own NTP pool, timesyncd's compiled-in fallback, stated so the drop-in says the whole of what timesyncd uses",
"3.arch.pool.ntp.org": "the distribution's own NTP pool, timesyncd's compiled-in fallback, stated so the drop-in says the whole of what timesyncd uses"
}
},
{
"id": "retire-ntpd",
"type": "process",
"name": "time-sync-retire-ntpd",
"artifact": "tools",
"run": [
"./time-sync-tools",
"retire",
"ntpd.service",
"ntpdate.service"
],
"run-once": true
},
{
"id": "daemon",
"type": "service",
"unit": "systemd-timesyncd.service",
"state": "running",
"boot": "enabled",
"restart-on": [
"servers"
]
},
{
"id": "ntp",
"type": "package",
"package": "ntp",
"absent": true
}
],
"build": {
"artifacts": [
{
"name": "tools",
"kind": "bundle",
"language": "go",
"system": "arch",
"from": "cmd/time-sync-tools",
"binary": "time-sync-tools",
"loads": [
"time-sync-tools"
]
}
]
}
}