
This adds support for forcing time synchronisation after configuring chrony if ntp_force_sync is changed to True. Change-Id: I4e0fd325e2ceb698f1f959bc060b68bd629750e0 Co-Authored-By: Will Szumski <will@stackhpc.com>
18 lines
387 B
YAML
18 lines
387 B
YAML
---
|
|
- name: Force time synchronisation
|
|
become: True
|
|
block:
|
|
- name: Configure burst
|
|
command: chronyc 'burst 4/4'
|
|
|
|
- name: Step the clock
|
|
command: chronyc makestep
|
|
|
|
- name: Wait before hardware clock synchronisation
|
|
pause:
|
|
seconds: 5
|
|
|
|
- name: Force hardware clock synchronisation
|
|
command: hwclock --systohc
|
|
when: ntp_force_sync | bool
|