ansible/roles/i2c-clock/tasks/set-time.yml
2021-01-25 21:50:02 +01:00

16 lines
322 B
YAML

---
- become: yes
block:
- name: load hwclock
shell:
cmd: |
modprobe rtc-ds1307
echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device
- name: update time
shell:
cmd: |
hwclock -w
- name: read time
shell:
cmd: |
hwclock -r