From ce462f322136a2640b443ce6347204b440c75ee6 Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Sat, 20 Apr 2024 23:38:31 +0300 Subject: [PATCH] Ansible: Add a clock sync to OpenWRT hosts in the update playbook. If the clock drift is too big (I've seen a month) then certificate validation fails and fetching updates fails. --- Ansible/update.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Ansible/update.yaml b/Ansible/update.yaml index 4ca5214..4549a3a 100644 --- a/Ansible/update.yaml +++ b/Ansible/update.yaml @@ -69,6 +69,11 @@ tags: - openwrt block: + # Sometimes the clock is not synced, the date is wrong and certificate + # validation during downloads fails. + - name: Sync clock + command: ntpd -n -q -p 0.openwrt.pool.ntp.org -p 1.openwrt.pool.ntp.org -p 2.openwrt.pool.ntp.org -p 3.openwrt.pool.ntp.org + - name: Update package list command: opkg update changed_when: false -- GitLab