From 4b2868783f7bceb78ea9d40220acca43a103fdb3 Mon Sep 17 00:00:00 2001 From: Jeltz Date: Thu, 25 Aug 2022 23:51:09 +0200 Subject: [PATCH 1/3] chronyd: fix typo in chrony.conf.j2 --- roles/chronyd/templates/chrony.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/chronyd/templates/chrony.conf.j2 b/roles/chronyd/templates/chrony.conf.j2 index ea994d8..2e896ba 100644 --- a/roles/chronyd/templates/chrony.conf.j2 +++ b/roles/chronyd/templates/chrony.conf.j2 @@ -5,7 +5,7 @@ pool {{ pool }} iburst {% endfor %} keyfile {{ chronyd__key_file }} -dritfile {{ chronyd__drift_file }} +driftfile {{ chronyd__drift_file }} ntsdumpdir {{ chronyd__nts_dump_dir }} log tracking measurements statistics From b00d5bc09e6a5da7a17400141f527925406ddb6d Mon Sep 17 00:00:00 2001 From: Jeltz Date: Thu, 25 Aug 2022 23:51:57 +0200 Subject: [PATCH 2/3] chronyd: fix unit name + remove other ntp packages --- roles/chronyd/handlers/main.yml | 2 +- roles/chronyd/tasks/main.yml | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/roles/chronyd/handlers/main.yml b/roles/chronyd/handlers/main.yml index 4a12e18..c6b9394 100644 --- a/roles/chronyd/handlers/main.yml +++ b/roles/chronyd/handlers/main.yml @@ -1,6 +1,6 @@ --- - name: Restart chronyd systemd: - name: chronyd.service + name: chrony.service state: restarted ... diff --git a/roles/chronyd/tasks/main.yml b/roles/chronyd/tasks/main.yml index 9910415..ee0bafc 100644 --- a/roles/chronyd/tasks/main.yml +++ b/roles/chronyd/tasks/main.yml @@ -1,4 +1,12 @@ --- +- name: Uninstall ntp and sntp + apt: + name: + - sntp + - ntp + - systemd-timesyncd + state: absent + - name: Install chronyd apt: name: chrony @@ -18,7 +26,7 @@ - name: Enable and start chronyd systemd: - name: chronyd.service + name: chrony.service enabled: true state: started ... From f5f570f635597498e3dd02b4b3a59aa6e2e36a16 Mon Sep 17 00:00:00 2001 From: Jeltz Date: Fri, 26 Aug 2022 00:06:25 +0200 Subject: [PATCH 3/3] chronyd: deploy everywhere --- playbooks/chronyd.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/playbooks/chronyd.yml b/playbooks/chronyd.yml index e5a0619..e7b629e 100755 --- a/playbooks/chronyd.yml +++ b/playbooks/chronyd.yml @@ -13,4 +13,14 @@ - 3.pool.ntp.org roles: - chronyd + +- hosts: + - all + - "!ntp-1.int.infra.auro.re" + - "!unifi" + vars: + chronyd__pools: + - ntp-1.int.infra.auro.re + roles: + - chronyd ...