mirror of https://github.com/ceph/ceph-ansible.git
Add support for different NTP daemons
Allow user to choose between timesyncd, chronyd and ntpd Installation will default to timesyncd since it is distributed as part of the systemd installation for most distros. Added note indicating NTP daemon type is not used for containerized deployments. Fixes issue #3086 on Github Signed-off-by: Benjamin Cherian <benjamin_cherian@amat.com>pull/3183/head v3.2.0beta3
parent
eddb95941b
commit
85071e6e53
|
@ -105,10 +105,15 @@ dummy:
|
||||||
# Whether or not to install the ceph-test package.
|
# Whether or not to install the ceph-test package.
|
||||||
#ceph_test: false
|
#ceph_test: false
|
||||||
|
|
||||||
# Enable the ntp service by default to avoid clock skew on
|
# Enable the ntp service by default to avoid clock skew on ceph nodes
|
||||||
# ceph nodes
|
# Disable if an appropriate NTP client is already installed and configured
|
||||||
#ntp_service_enabled: true
|
#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
|
||||||
|
|
||||||
|
|
||||||
# Set uid/gid to default '64045' for bootstrap directories.
|
# Set uid/gid to default '64045' for bootstrap directories.
|
||||||
# '64045' is used for debian based distros. It must be set to 167 in case of rhel based distros.
|
# '64045' is used for debian based distros. It must be set to 167 in case of rhel based distros.
|
||||||
# These values have to be set according to the base OS used by the container image, NOT the host.
|
# These values have to be set according to the base OS used by the container image, NOT the host.
|
||||||
|
|
|
@ -105,10 +105,15 @@ fetch_directory: ~/ceph-ansible-keys
|
||||||
# Whether or not to install the ceph-test package.
|
# Whether or not to install the ceph-test package.
|
||||||
#ceph_test: false
|
#ceph_test: false
|
||||||
|
|
||||||
# Enable the ntp service by default to avoid clock skew on
|
# Enable the ntp service by default to avoid clock skew on ceph nodes
|
||||||
# ceph nodes
|
# Disable if an appropriate NTP client is already installed and configured
|
||||||
#ntp_service_enabled: true
|
#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
|
||||||
|
|
||||||
|
|
||||||
# Set uid/gid to default '64045' for bootstrap directories.
|
# Set uid/gid to default '64045' for bootstrap directories.
|
||||||
# '64045' is used for debian based distros. It must be set to 167 in case of rhel based distros.
|
# '64045' is used for debian based distros. It must be set to 167 in case of rhel based distros.
|
||||||
# These values have to be set according to the base OS used by the container image, NOT the host.
|
# These values have to be set according to the base OS used by the container image, NOT the host.
|
||||||
|
|
|
@ -1,11 +1,29 @@
|
||||||
---
|
---
|
||||||
- name: install ntp on debian
|
- name: setup ntpd
|
||||||
package:
|
block:
|
||||||
|
- command: timedatectl set-ntp no
|
||||||
|
- package:
|
||||||
name: ntp
|
name: ntp
|
||||||
state: present
|
state: present
|
||||||
|
- service:
|
||||||
- name: start the ntp service
|
|
||||||
service:
|
|
||||||
name: ntp
|
name: ntp
|
||||||
enabled: yes
|
enabled: yes
|
||||||
state: started
|
state: started
|
||||||
|
when: ntp_daemon_type == "ntpd"
|
||||||
|
|
||||||
|
- name: setup chrony
|
||||||
|
block:
|
||||||
|
- command: timedatectl set-ntp no
|
||||||
|
- package:
|
||||||
|
name: chrony
|
||||||
|
state: present
|
||||||
|
- service:
|
||||||
|
name: chronyd
|
||||||
|
enabled: yes
|
||||||
|
state: started
|
||||||
|
when: ntp_daemon_type == "chronyd"
|
||||||
|
|
||||||
|
- name: setup timesyncd
|
||||||
|
block:
|
||||||
|
- command: timedatectl set-ntp on
|
||||||
|
when: ntp_daemon_type == "timesyncd"
|
||||||
|
|
|
@ -1,11 +1,29 @@
|
||||||
---
|
---
|
||||||
- name: install ntp
|
- name: setup ntpd
|
||||||
package:
|
block:
|
||||||
|
- command: timedatectl set-ntp no
|
||||||
|
- package:
|
||||||
name: ntp
|
name: ntp
|
||||||
state: present
|
state: present
|
||||||
|
- service:
|
||||||
- name: start the ntp service
|
|
||||||
service:
|
|
||||||
name: ntpd
|
name: ntpd
|
||||||
enabled: yes
|
enabled: yes
|
||||||
state: started
|
state: started
|
||||||
|
when: ntp_daemon_type == "ntpd"
|
||||||
|
|
||||||
|
- name: setup chrony
|
||||||
|
block:
|
||||||
|
- command: timedatectl set-ntp no
|
||||||
|
- package:
|
||||||
|
name: chrony
|
||||||
|
state: present
|
||||||
|
- service:
|
||||||
|
name: chronyd
|
||||||
|
enabled: yes
|
||||||
|
state: started
|
||||||
|
when: ntp_daemon_type == "chronyd"
|
||||||
|
|
||||||
|
- name: setup timesyncd
|
||||||
|
block:
|
||||||
|
- command: timedatectl set-ntp on
|
||||||
|
when: ntp_daemon_type == "timesyncd"
|
||||||
|
|
|
@ -97,10 +97,15 @@ suse_package_dependencies:
|
||||||
# Whether or not to install the ceph-test package.
|
# Whether or not to install the ceph-test package.
|
||||||
ceph_test: false
|
ceph_test: false
|
||||||
|
|
||||||
# Enable the ntp service by default to avoid clock skew on
|
# Enable the ntp service by default to avoid clock skew on ceph nodes
|
||||||
# ceph nodes
|
# Disable if an appropriate NTP client is already installed and configured
|
||||||
ntp_service_enabled: true
|
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
|
||||||
|
|
||||||
|
|
||||||
# Set uid/gid to default '64045' for bootstrap directories.
|
# Set uid/gid to default '64045' for bootstrap directories.
|
||||||
# '64045' is used for debian based distros. It must be set to 167 in case of rhel based distros.
|
# '64045' is used for debian based distros. It must be set to 167 in case of rhel based distros.
|
||||||
# These values have to be set according to the base OS used by the container image, NOT the host.
|
# These values have to be set according to the base OS used by the container image, NOT the host.
|
||||||
|
|
|
@ -28,6 +28,13 @@
|
||||||
- ceph_rhcs_cdn_debian_repo == 'https://customername:customerpasswd@rhcs.download.redhat.com'
|
- ceph_rhcs_cdn_debian_repo == 'https://customername:customerpasswd@rhcs.download.redhat.com'
|
||||||
- ceph_repository not in ['rhcs', 'dev', 'obs']
|
- ceph_repository not in ['rhcs', 'dev', 'obs']
|
||||||
|
|
||||||
|
- name: validate ntp daemon type
|
||||||
|
fail:
|
||||||
|
msg: "ntp_daemon_type must be one of chronyd, ntpd, or timesyncd"
|
||||||
|
when:
|
||||||
|
- ntp_service_enabled
|
||||||
|
- ntp_daemon_type not in ['chronyd', 'ntpd', 'timesyncd']
|
||||||
|
|
||||||
- name: make sure journal_size configured
|
- name: make sure journal_size configured
|
||||||
debug:
|
debug:
|
||||||
msg: "WARNING: journal_size is configured to {{ journal_size }}, which is less than 5GB. This is not recommended and can lead to severe issues."
|
msg: "WARNING: journal_size is configured to {{ journal_size }}, which is less than 5GB. This is not recommended and can lead to severe issues."
|
||||||
|
|
Loading…
Reference in New Issue