]> git.phdru.name Git - ansible.git/blobdiff - playbooks/roles/adjtimex/templates/adjtimex.sh
Feat(adjtimex): Use `hwclock --update-drift`
[ansible.git] / playbooks / roles / adjtimex / templates / adjtimex.sh
index 4ee2a4b1676dc1a776bb44ac7463f713402bec87..8721907b97381c5446af6d90fd64025c5cb1dfa2 100755 (executable)
@@ -3,11 +3,21 @@
 # Stole some ideas from
 # http://support.ntp.org/bin/view/Support/ManualCalibration
 
+# Warm up DNS
+host -t ns pool.ntp.org
+host pool.ntp.org
+{% if ansible_facts.os_family == 'Debian' %}
+host 0.debian.pool.ntp.org
+host 1.debian.pool.ntp.org
+host 2.debian.pool.ntp.org
+host 3.debian.pool.ntp.org
+{% endif %}
+
 { echo; echo; } | adjtimex -l &&
 ntpdate{% if ansible_facts.os_family == 'Debian' %}-debian{% endif %} &&
 { echo; echo; } | adjtimex -l &&
 
-hwclock --systohc &&
+hwclock --systohc --update-drift &&
 { echo; echo; } | adjtimex -l &&
 hwclock --hctosys &&