From 29561c44c898fbbc07ecf026a63d9f99b7913562 Mon Sep 17 00:00:00 2001 From: Tuan-Dat Tran Date: Mon, 20 Apr 2026 20:18:19 +0200 Subject: [PATCH] fix: enable and start systemd-timesyncd in common time role systemd-timesyncd was installed via common_packages but never enabled or started, causing NodeClockNotSynchronising alerts across all k3s nodes. --- roles/common/tasks/time.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/roles/common/tasks/time.yaml b/roles/common/tasks/time.yaml index e0c8327..0b03106 100644 --- a/roles/common/tasks/time.yaml +++ b/roles/common/tasks/time.yaml @@ -9,3 +9,18 @@ community.general.timezone: name: "{{ timezone }}" when: ansible_user_id == "root" + +- name: Enable and start systemd-timesyncd + ansible.builtin.systemd: + name: systemd-timesyncd + enabled: true + state: started + become: true + when: ansible_user_id != "root" + +- name: Enable and start systemd-timesyncd + ansible.builtin.systemd: + name: systemd-timesyncd + enabled: true + state: started + when: ansible_user_id == "root"