Skip to content

Instantly share code, notes, and snippets.

@noonedeadpunk
Created February 26, 2020 07:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save noonedeadpunk/67fb5474f17b09009cd6884f71d4e777 to your computer and use it in GitHub Desktop.
Save noonedeadpunk/67fb5474f17b09009cd6884f71d4e777 to your computer and use it in GitHub Desktop.
---
- 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