From f99ffb1a03d7a389bff3489ada4608304c01ee94 Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Thu, 20 Jun 2024 16:45:27 +0200 Subject: [PATCH] chrony: sources per server Signed-off-by: Frank Villaro-Dixon --- ansible/files/chrony.conf.j2 | 15 ++++----------- ansible/files/index.html | 12 ++++++++++++ ansible/inventory.yml | 23 +++++++++++++++++++++++ 3 files changed, 39 insertions(+), 11 deletions(-) diff --git a/ansible/files/chrony.conf.j2 b/ansible/files/chrony.conf.j2 index 498b06b..df2f376 100644 --- a/ansible/files/chrony.conf.j2 +++ b/ansible/files/chrony.conf.j2 @@ -16,23 +16,16 @@ # you can access at http://support.ntp.org/bin/view/Servers/WebHome or # you can use servers from the pool.ntp.org project. -pool pool.ntp.infomaniak.ch iburst -server ntp11.metas.ch -server ntp-p1.obspm.fr -server tock.zg.ch {% if ansible_hostname == "chronos" %} ## Chronos is a stratum 1 server. Peers with ntp-s2 -server ntp-s2.lan.k3s.fr iburst refclock PPS /dev/pps0 refid PPS refclock SHM 0 refid GPS poll 2 precision 1e-3 offset 0.128 -{% else %} -## NTP s2 is a VM. Peers with chronos and other NTP S1 servers -server chronos.lan.k3s.fr iburst -server ntp-s2-1.itu.ch -server ntp.sceen.net -server ntp1.as34288.net {% endif %} +{% for ntp_server in ntp_servers %} +server {{ ntp_server }} iburst +{% endfor %} + ####################################################################### ### AVOIDING POTENTIALLY BOGUS CHANGES TO YOUR CLOCK diff --git a/ansible/files/index.html b/ansible/files/index.html index 7d37934..115c248 100644 --- a/ansible/files/index.html +++ b/ansible/files/index.html @@ -4,6 +4,7 @@

NTP server {{ ansible_hostname }}

+

BGP IPs

+ + +

NTP sources

+ \ No newline at end of file diff --git a/ansible/inventory.yml b/ansible/inventory.yml index 9ea9664..0664596 100644 --- a/ansible/inventory.yml +++ b/ansible/inventory.yml @@ -5,6 +5,12 @@ pi: bgp_asn: 64600 bgp_router_asn: 65100 bgp_ipv6: 2a01:e0a:431:b527::a123 + ntp_servers: + - ntp-s2-cra.lan.k3s.fr + - ntp-s2-ces.lan.k3s.fr + - ntp11.metas.ch + - tock.zg.ch + - tick.ntp.infomaniak.ch vms: hosts: ntp-s2-cra.lan.k3s.fr: @@ -12,9 +18,26 @@ vms: bgp_asn: 64601 bgp_router_asn: 65100 bgp_ipv6: 2a01:e0a:431:b527::b123 + ntp_servers: + - chronos.lan.k3s.fr + - ntp-s2-ces.lan.k3s.fr + - ntp12.metas.ch + - ntp-p1.obspm.fr + - ntp-s2-1.itu.ch + - ntp02.gyptazy.ch + - falseticker.ntp.infomaniak.ch + ntp-s2-ces.lan.k3s.fr: bgp_router_ipv6: 2a0e:e701:122c:42::1 bgp_asn: 64602 bgp_router_asn: 65000 bgp_ipv6: 2a0e:e701:122c:fff0::a123 + ntp_servers: + - chronos.lan.k3s.fr + - ntp-s2-cra.lan.k3s.fr + - ntp13.metas.ch + - time.esa.int + - ntp.sceen.net + - g0.pub.gps.s1.ntp.faelix.net + - tock.ntp.infomaniak.ch