]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-infra: make chronyd default NTP daemon
authorRishabh Dave <ridave@redhat.com>
Wed, 12 Jun 2019 09:09:44 +0000 (14:39 +0530)
committermergify[bot] <mergify[bot]@users.noreply.github.com>
Fri, 14 Jun 2019 12:21:02 +0000 (12:21 +0000)
Since timesyncd is not available on RHEL-based OSs, change the default
to chronyd for RHEL-based OSs. Also, chronyd is chrony on Ubuntu, so
set the Ansible fact accordingly.

Fixes: https://github.com/ceph/ceph-ansible/issues/3628
Signed-off-by: Rishabh Dave <ridave@redhat.com>
(cherry picked from commit 9d88d3199fd8c6548a56bf9e95cd9239481baa39)

group_vars/all.yml.sample
group_vars/rhcs.yml.sample
roles/ceph-defaults/defaults/main.yml
roles/ceph-facts/tasks/facts.yml
roles/ceph-infra/tasks/setup_ntp.yml

index 305d14e2db86a644741ec9825401a9deea57168e..05ff7ea990247542421b666b1868395722de15f0 100644 (file)
@@ -100,7 +100,7 @@ dummy:
 
 # Set type of NTP client daemon to use, valid entries are chronyd, ntpd or timesyncd
 # Note that this selection is currently ignored on containerized deployments
-#ntp_daemon_type: timesyncd
+#ntp_daemon_type: chronyd
 
 
 # Set uid/gid to default '64045' for bootstrap directories.
index b67529cb2599e91a4843e23e41cb85f6ffad9714..68547629ae8eeb53f409edbd6468fbee7801f234 100644 (file)
@@ -100,7 +100,7 @@ fetch_directory: ~/ceph-ansible-keys
 
 # Set type of NTP client daemon to use, valid entries are chronyd, ntpd or timesyncd
 # Note that this selection is currently ignored on containerized deployments
-#ntp_daemon_type: timesyncd
+#ntp_daemon_type: chronyd
 
 
 # Set uid/gid to default '64045' for bootstrap directories.
index 632ffde3d19253dad1f1e6210231df9faf7557a9..83518ca54ac86f612dbbd9382e34ccecfdda2f5d 100644 (file)
@@ -92,7 +92,7 @@ ntp_service_enabled: true
 
 # Set type of NTP client daemon to use, valid entries are chronyd, ntpd or timesyncd
 # Note that this selection is currently ignored on containerized deployments
-ntp_daemon_type: timesyncd
+ntp_daemon_type: chronyd
 
 
 # Set uid/gid to default '64045' for bootstrap directories.
index 05fba0327b4b8e0e515ad03ed8575924e8195b76..c6f978179f55daf1482bd5fb40f29c4f605f97d3 100644 (file)
       ntp_service_name: ntpd
     when: ansible_os_family in ['RedHat', 'Suse']
 
+- name: set chrony daemon name RedHat and Ubuntu based OSs
+  block:
+    - name: set chronyd daemon name for RedHat based OSs
+      set_fact:
+        chrony_daemon_name: chronyd
+      when: ansible_os_family in ["RedHat", "Suse"]
+
+    - name: set chronyd daemon name for Ubuntu based OSs
+      set_fact:
+        chrony_daemon_name: chrony
+      when: ansible_os_family == "Debian"
+
 - name: set grafana_server_addr fact
   set_fact:
     grafana_server_addr: "{{ (hostvars[groups[grafana_server_group_name][0] | default(groups[mgr_group_name][0])])['ansible_all_ipv4_addresses'] | ipaddr(public_network) | first }}"
index 775b1367dcd8a7fe7b02ac8de892f8724455c684..d246333d5606b992d656eb6ca2be947d3e5adf88 100644 (file)
@@ -45,7 +45,7 @@
 
     - name: enable chronyd
       service:
-        name: chronyd
+        name: "{{ chrony_daemon_name }}"
         enabled: yes
         state: started
       notify: