system/tasks/time.yml

15 lines
402 B
YAML
Raw Normal View History

2018-12-02 20:03:03 +00:00
---
- name: Enable timesync
2022-12-10 17:51:03 +00:00
ansible.builtin.service:
2022-10-09 17:43:15 +00:00
name: systemd-timesyncd.service
enabled: true
state: started
2022-02-13 08:40:15 +00:00
become: true
2022-10-23 13:29:16 +00:00
when: ansible_facts['os_family'] == 'Archlinux' and not ansible_virtualization_type in ["lxc","docker"]
2019-04-16 14:39:04 +00:00
- name: Set timezone and hardware clock
2022-12-10 17:51:03 +00:00
community.general.timezone:
2022-02-13 08:40:15 +00:00
hwclock: "{{ time.hwclock }}"
name: "{{ time.timezone }}"
become: true