35 lines
681 B
YAML
35 lines
681 B
YAML
---
|
|
# 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
|
|
|
|
- name: Set timezone to defined variable
|
|
timezone:
|
|
name: "{{ base_core_timezone }}"
|