mirror of https://github.com/ceph/ceph-ansible.git
41 lines
910 B
YAML
41 lines
910 B
YAML
---
|
|
- name: setup ntpd
|
|
block:
|
|
- name: timedatectl set-ntp no
|
|
command: timedatectl set-ntp no
|
|
- name: install ntp
|
|
package:
|
|
name: ntp
|
|
state: present
|
|
register: result
|
|
until: result is succeeded
|
|
- name: start ntp
|
|
service:
|
|
name: ntpd
|
|
enabled: yes
|
|
state: started
|
|
when: ntp_daemon_type == "ntpd"
|
|
|
|
- name: setup chrony
|
|
block:
|
|
- name: timedatectl set-ntp no
|
|
command: timedatectl set-ntp no
|
|
- name: install chrony
|
|
package:
|
|
name: chrony
|
|
state: present
|
|
register: result
|
|
until: result is succeeded
|
|
- name: start chrony
|
|
service:
|
|
name: chronyd
|
|
enabled: yes
|
|
state: started
|
|
when: ntp_daemon_type == "chronyd"
|
|
|
|
- name: setup timesyncd
|
|
block:
|
|
- name: timedatectl set-ntp on
|
|
command: timedatectl set-ntp on
|
|
when: ntp_daemon_type == "timesyncd"
|