system/tasks/time.yml

13 lines
301 B
YAML
Raw Normal View History

2018-12-02 20:03:03 +00:00
---
- name: Enable timesync
command: timedatectl set-ntp true
2022-02-13 08:40:15 +00:00
become: true
2018-12-02 20:03:03 +00:00
args:
2019-04-16 14:39:04 +00:00
creates: /etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service
- name: Set timezone and hardware clock
timezone:
2022-02-13 08:40:15 +00:00
hwclock: "{{ time.hwclock }}"
name: "{{ time.timezone }}"
become: true