2016-06-10 09:32:55 +08:00
|
|
|
---
|
2018-09-06 00:59:50 +08:00
|
|
|
- name: setup ntpd
|
|
|
|
block:
|
|
|
|
- command: timedatectl set-ntp no
|
|
|
|
- package:
|
|
|
|
name: ntp
|
|
|
|
state: present
|
|
|
|
- service:
|
|
|
|
name: ntp
|
|
|
|
enabled: yes
|
|
|
|
state: started
|
|
|
|
when: ntp_daemon_type == "ntpd"
|
2016-06-10 09:32:55 +08:00
|
|
|
|
2018-09-06 00:59:50 +08:00
|
|
|
- name: setup chrony
|
|
|
|
block:
|
|
|
|
- command: timedatectl set-ntp no
|
|
|
|
- package:
|
|
|
|
name: chrony
|
|
|
|
state: present
|
|
|
|
- service:
|
|
|
|
name: chronyd
|
|
|
|
enabled: yes
|
|
|
|
state: started
|
|
|
|
when: ntp_daemon_type == "chronyd"
|
|
|
|
|
|
|
|
- name: setup timesyncd
|
|
|
|
block:
|
|
|
|
- command: timedatectl set-ntp on
|
|
|
|
when: ntp_daemon_type == "timesyncd"
|