]> git.phdru.name Git - ansible.git/blobdiff - playbooks/roles/adjtimex/templates/adjtimex.sh
Feat(adjtimex): Fix pool address at the second run
[ansible.git] / playbooks / roles / adjtimex / templates / adjtimex.sh
index 1a4d1c159de52947be957cd07e9d753fe584d788..98e11353b8c61ed339d74c9c7656df2045b5e3c4 100755 (executable)
@@ -10,6 +10,6 @@ tick=`adjtimex -p | awk '/tick:/ {print $2}'` &&
 sed -i "s/^FREQ=.\+$/FREQ=$freq/" /etc/default/adjtimex &&
 sed -i "s/^TICK=.\+$/TICK=$tick/" /etc/default/adjtimex &&
 
-ntpdate-debian &&
+ntpdate{% if ansible_facts.os_family == 'Debian' %}-debian{% endif %} &&
 hwclock --systohc &&
-{ echo; echo; } | adjtimex -h ru.pool.ntp.org
+{ echo; echo; } | adjtimex -h {% if inventory_hostname == 'phdru.name' %}nl{% else %}ru{% endif %}.pool.ntp.org &&