2017-09-05 12:01:27 +02:00
|
|
|
---
|
|
|
|
- name: ensure systemd-timesyncd is disabled
|
|
|
|
systemd:
|
|
|
|
name: systemd-timesyncd
|
|
|
|
enabled: no
|
|
|
|
state: stopped
|
|
|
|
|
|
|
|
- name: install ntp packages
|
2017-10-11 17:53:20 +02:00
|
|
|
package:
|
2017-09-05 12:01:27 +02:00
|
|
|
name: "{{ item }}"
|
2017-10-11 17:53:20 +02:00
|
|
|
state: present
|
2018-09-16 12:38:33 +02:00
|
|
|
loop:
|
2017-09-05 12:01:27 +02:00
|
|
|
- ntp
|
|
|
|
- ntp-doc
|
|
|
|
- ntpdate
|
|
|
|
- ntpstat
|
|
|
|
|
2019-03-18 10:05:11 +01:00
|
|
|
- name: update if-up ntpdate script
|
|
|
|
template:
|
|
|
|
src: ntpdate.j2
|
|
|
|
dest: /etc/network/if-up.d/ntpdate
|
|
|
|
mode: 0755
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
|
2017-09-05 12:01:27 +02:00
|
|
|
- name: enable and start ntp daemon
|
|
|
|
systemd:
|
|
|
|
name: ntp
|
|
|
|
enabled: yes
|
|
|
|
state: started
|