Commit ce462f32 authored by nimrod's avatar nimrod
Browse files

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.
parent 5d6a5159
Loading
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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