system/tasks/time.yml
2019-04-16 16:39:04 +02:00

12 lines
298 B
YAML

---
- name: Enable timesync
command: timedatectl set-ntp true
become: yes
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: yes