Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
---
- name: Sync clock with chrony
hosts: all
tasks:
- name: disable ntp
service:
name: ntp
state: stopped
enabled: false
failed_when: false
- name: enable chrony
service:
name: chrony
state: started
enabled: true
- name: reset chrony step
command: "chronyc makestep 1 3"
- name: sync chrony
command: "chronyc -a 'burst 4/4'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment