Open dschanoeh opened 4 years ago
What about having something like timesync_rtc_set: true
with a tri-state value of false
(no update is attempted), true
(an update is attempted if /dev/rtc
exists), and force
(role fails if /dev/rtc
does not exist).
There is no reason why we wouldn't specify the RTC device, but I don't think (maybe I'm wrong) the path is different on different kernels.
The documentation indicates that it could also be /dev/rtc0, /dev/rtc1, etc. So maybe it wouldn't hurt to have a variable as well. I'm almost done implementing the tri-state variable but having read more of the documentation, I'm now wondering:
timedatectl | grep "NTP synchronized"
. Should I add that as well?
Hi,
I just ran this role against a pizero which doesn't have a RTC. In that case, the "Write adjtime" handler fails:
To fix, one could either:
I could create a PR for one of those options.