When one of the currently supported NTP services has been set up,
disable rest of the NTP services on Ceph nodes.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
service:
name: firewalld
state: restarted
- enabled: yes
\ No newline at end of file
+ enabled: yes
+
+- name: disable ntpd
+ failed_when: false
+ service:
+ name: ntpd
+ state: stopped
+ enabled: no
+
+- name: disable chronyd
+ failed_when: false
+ service:
+ name: chronyd
+ enabled: no
+ state: stopped
+
+- name: disable timesyncd
+ failed_when: false
+ service:
+ name: timesyncd
+ enabled: no
+ state: stopped
- name: install and enable timesyncd
command: timedatectl set-ntp on
when: ntp_daemon_type == "timesyncd"
+ notify:
+ - disable ntpd
+ - disable chronyd
- name: disable time sync using timesyncd if we are not using it
command: timedatectl set-ntp no
name: "{{ ntp_service_name }}"
enabled: yes
state: started
+ notify:
+ - disable chronyd
+ - disable timesyncd
- name: setup chronyd
when: ntp_daemon_type == "chronyd"
name: chronyd
enabled: yes
state: started
+ notify:
+ - disable chronyd
+ - disable timesyncd