ceph-infra: make chronyd default NTP daemon

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 9d88d3199f)
pull/4108/head
Rishabh Dave 2019-06-12 14:39:44 +05:30 committed by mergify[bot]
parent 6805eb3184
commit dc66a5e65a
5 changed files with 16 additions and 4 deletions

View 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.

View 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.

View 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.

View File

@ -290,6 +290,18 @@
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 }}"

View File

@ -45,7 +45,7 @@
- name: enable chronyd
service:
name: chronyd
name: "{{ chrony_daemon_name }}"
enabled: yes
state: started
notify: