]> git-server-git.apps.pok.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)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Thu, 13 Jun 2019 18:53:22 +0000 (14:53 -0400)
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>
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 28bb0ce8b4f9beb3dd8a3fe7ab67e32f0741c142..74b3e61ccd316b7ceb7a624ab3997a57210343cc 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 f1fc0a04fb685034fdb414bd263038c03ce3fda4..82fc4eba9e666aac9e81d5d6c0578ff0d8e9496c 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 d14ab05d0b0498470a4285d05b668bba46a38314..698c99378c82c3e134f608ec2f1cf1697feb7479 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: