ansible/roles/chronyd/tasks/main.yml

33 lines
510 B
YAML
Raw Permalink Normal View History

2022-08-25 23:01:00 +02:00
---
- name: Uninstall ntp and sntp
apt:
name:
- sntp
- ntp
- systemd-timesyncd
state: absent
2022-08-25 23:01:00 +02:00
- 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
2022-08-25 23:01:00 +02:00
enabled: true
state: started
...