system/tasks/time.yml
2022-02-13 09:42:01 +01:00

13 lines
301 B
YAML

---
- name: Enable timesync
command: timedatectl set-ntp true
become: true
args:
creates: /etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service
- name: Set timezone and hardware clock
timezone:
hwclock: "{{ time.hwclock }}"
name: "{{ time.timezone }}"
become: true