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.
This commit is contained in:
Tuan-Dat Tran
2026-04-20 20:18:19 +02:00
parent d33117a752
commit 29561c44c8

View File

@@ -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"