system/tasks/time.yml
vincent 1419eaa003
All checks were successful
continuous-integration/drone/push Build is passing
style: correct ansible lint
2022-12-10 20:25:54 +01:00

15 lines
402 B
YAML

---
- name: Enable timesync
ansible.builtin.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
community.general.timezone:
hwclock: "{{ time.hwclock }}"
name: "{{ time.timezone }}"
become: true