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)
# 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.
# 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.
# 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.
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 }}"
- name: enable chronyd
service:
- name: chronyd
+ name: "{{ chrony_daemon_name }}"
enabled: yes
state: started
notify: