32 lines
510 B
YAML
32 lines
510 B
YAML
---
|
|
- name: Uninstall ntp and sntp
|
|
apt:
|
|
name:
|
|
- sntp
|
|
- ntp
|
|
- systemd-timesyncd
|
|
state: absent
|
|
|
|
- name: Install chronyd
|
|
apt:
|
|
name: chrony
|
|
|
|
- name: Configure chronyd
|
|
template:
|
|
src: "{{ item }}.j2"
|
|
dest: "/etc/chrony/{{ item }}"
|
|
owner: root
|
|
group: root
|
|
mode: u=rw,g=r,o=
|
|
loop:
|
|
- chrony.conf
|
|
- chrony.keys
|
|
notify:
|
|
- Restart chronyd
|
|
|
|
- name: Enable and start chronyd
|
|
systemd:
|
|
name: chrony.service
|
|
enabled: true
|
|
state: started
|
|
...
|