Skip to content

Commit

Permalink
Merge pull request #240 from nader-ziada/azure-chrony
Browse files Browse the repository at this point in the history
Add chrony for time sync for Azure image
  • Loading branch information
k8s-ci-robot authored Jun 15, 2020
2 parents 2f7ba61 + 58794c3 commit bfcc794
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions images/capi/ansible/roles/providers/tasks/azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,31 @@
vars:
packages:
- azure-cli

- name: Ansible apt install chrony
apt:
name: chrony
state: present
when: ansible_distribution == "Ubuntu"

- name: Configure PTP
lineinfile:
path: /etc/chrony/chrony.conf
create: yes
line: refclock PHC /dev/ptp0 poll 3 dpoll -2 offset 0
when: ansible_distribution == "Ubuntu"

- name: Ensure makestep parameter set as per Azure recommendation
lineinfile:
path: /etc/chrony/chrony.conf
regexp: '^makestep'
line: makestep 1.0 -1
when: ansible_distribution == "Ubuntu"

- name: Enable chrony.service
systemd:
enabled: yes
state: started
daemon_reload: yes
name: chrony.service
when: ansible_distribution == "Ubuntu"

0 comments on commit bfcc794

Please sign in to comment.