2021-09-01 17:31:49 -06:00
|
|
|
---
|
|
|
|
# file: roles/base/tasks/debian_time_sync.yml
|
|
|
|
|
|
|
|
- name: Install chrony
|
|
|
|
package:
|
|
|
|
name: chrony
|
|
|
|
state: latest
|
|
|
|
|
|
|
|
- name: Set refclock
|
|
|
|
lineinfile:
|
|
|
|
path: /etc/chrony/chrony.conf
|
|
|
|
line: 'refclock PHC /dev/ptp0 trust poll 1 filter 4'
|
|
|
|
insertafter: EOF
|
|
|
|
|
|
|
|
- name: Set makestep
|
|
|
|
lineinfile:
|
|
|
|
path: /etc/chrony/chrony.conf
|
|
|
|
regexp: '^makestep '
|
|
|
|
line: 'makestep 1 -1'
|
|
|
|
|
|
|
|
- name: Disable systemd-timesyncd
|
|
|
|
service:
|
|
|
|
name: systemd-timesyncd
|
|
|
|
state: stopped
|
|
|
|
enabled: false
|
|
|
|
|
|
|
|
- name: Enable chrony
|
|
|
|
service:
|
|
|
|
name: chronyd
|
|
|
|
state: started
|
|
|
|
enabled: true
|
2021-09-09 15:19:32 -06:00
|
|
|
|
|
|
|
- name: Set timezone to defined variable
|
|
|
|
timezone:
|
|
|
|
name: "{{ base_core_timezone }}"
|