]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-common: disable unrequired NTP services v3.1.13
authorRishabh Dave <ridave@redhat.com>
Wed, 12 Dec 2018 11:23:23 +0000 (16:53 +0530)
committerSébastien Han <seb@redhat.com>
Mon, 14 Jan 2019 15:37:35 +0000 (16:37 +0100)
When one of the currently supported NTP services has been set up,
disable rest of the NTP services on Ceph nodes.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1651875
Signed-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit 6fa757d34358e90ae3a2f035b50d319193521ec5)

roles/ceph-common/handlers/main.yml
roles/ceph-common/tasks/misc/setup_ntp.yml

index 5a9d5241080d0a363a3ffd09a72f649632230fe9..0478dd054da9ba7eb19724027d5da4df268596b8 100644 (file)
@@ -4,3 +4,24 @@
     name: firewalld
     state: restarted
     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
index b6a2ce34a20fb4a4497b4a44ea3432f24cc470de..cb2a89aa5f7628022583bbb1dfa64e39f21a37b9 100644 (file)
@@ -15,6 +15,9 @@
     - 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
@@ -34,6 +37,9 @@
             name: "{{ ntp_service_name }}"
             enabled: yes
             state: started
+          notify:
+            - disable chronyd
+            - disable timesyncd
 
     - name: setup chronyd
       when: ntp_daemon_type == "chronyd"
@@ -49,3 +55,6 @@
             name: chronyd
             enabled: yes
             state: started
+          notify:
+            - disable chronyd
+            - disable timesyncd