NTP cluster configuration using chrony
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-27 05:48:34 +00:00
.woodpecker chore(package): update cr.simoncor.net/dockerhub/davidanson/markdownlint-cli2 docker tag to v0.23.2 2026-07-27 05:48:34 +00:00
defaults feat: remove ratelimit 2026-07-25 15:58:10 +02:00
handlers fix: service name 2026-07-25 15:53:43 +02:00
meta feat: initial commit 2026-07-25 15:48:08 +02:00
roles feat: add playbook and role requirement 2026-07-25 15:49:55 +02:00
tasks fix: service name 2026-07-25 15:53:43 +02:00
templates feat: set min/maxpoll identical to upstream and peers 2026-07-25 17:54:23 +02:00
.ansible-lint feat: initial commit 2026-07-25 15:48:08 +02:00
.editorconfig feat: initial commit 2026-07-25 15:48:08 +02:00
.gitattributes feat: initial commit 2026-07-25 15:48:08 +02:00
.gitignore feat: initial commit 2026-07-25 15:48:08 +02:00
.markdownlint-cli2.jsonc feat: initial commit 2026-07-25 15:48:08 +02:00
.sops.yaml feat: initial commit 2026-07-25 15:48:08 +02:00
.yamllint feat: initial commit 2026-07-25 15:48:08 +02:00
ansible.cfg feat: initial commit 2026-07-25 15:48:08 +02:00
playbook.yaml feat: set serial to 1 2026-07-25 15:51:11 +02:00
readme.md feat: remove ratelimit 2026-07-25 15:58:10 +02:00
renovate.json feat: initial commit 2026-07-25 15:48:08 +02:00

Ansible Role: NTP Cluster

Install and configure a Chrony NTP cluster with bidirectional server associations and orphan mode.

Supported Operating Systems

Operating System Version
Ubuntu 24.04 LTS +

Variables

Variable Required Default Description
ntp_upstream_servers No time.cloudflare.com, time.google.com List of upstream NTP servers
ntp_cluster_peers No [] List of cluster peers (hostname + ip)
ntp_allowed_subnets No [] Subnets allowed to query this server
ntp_local_stratum No 10 Stratum served when not synced (orphan mode)
ntp_driftfile_path No /var/lib/chrony/drift Path to chrony driftfile
ntp_config_path No /etc/chrony/chrony.conf Path to chrony configuration file
ntp_makestep_threshold No 1 Makestep threshold in seconds
ntp_makestep_limit No 3 Max clock adjustments before makestep stops
ntp_maxupdateskew No 100 Max update skew for faster syncing

Example

ntp_upstream_servers:
  - "time.cloudflare.com"
  - "time.google.com"

ntp_cluster_peers:
  - hostname: "ntp01.example.com"
    ip: "10.0.0.1"
  - hostname: "ntp02.example.com"
    ip: "10.0.0.2"

ntp_allowed_subnets:
  - "10.0.0.0/24"
  - "192.168.1.0/24"

ntp_local_stratum: "10"
ntp_makestep_threshold: "1"
ntp_makestep_limit: "3"
ntp_maxupdateskew: "100"