system/tasks/time.yml
2022-10-23 15:29:16 +02:00

15 lines
368 B
YAML

---
- name: Enable timesync
service:
name: systemd-timesyncd.service
enabled: true
state: started
become: true
when: ansible_facts['os_family'] == 'Archlinux' and not ansible_virtualization_type in ["lxc","docker"]
- name: Set timezone and hardware clock
timezone:
hwclock: "{{ time.hwclock }}"
name: "{{ time.timezone }}"
become: true