mirror of https://github.com/ceph/ceph-ansible.git
Add option to enable ntp
This fixes: #845 only for non-containerized deployments Signed-off-by: Ivan Font <ivan.font@redhat.com>pull/848/head
parent
08af355161
commit
453c299ed7
|
@ -64,6 +64,9 @@ dummy:
|
||||||
# - ntp
|
# - ntp
|
||||||
# - python-setuptools
|
# - python-setuptools
|
||||||
|
|
||||||
|
# Enable the ntp service by default to avoid clock skew on
|
||||||
|
# ceph nodes
|
||||||
|
#ntp_service_enabled: true
|
||||||
|
|
||||||
# The list of ceph packages needed for debian.
|
# The list of ceph packages needed for debian.
|
||||||
# This variable should only be changed if packages are not available from a given
|
# This variable should only be changed if packages are not available from a given
|
||||||
|
|
|
@ -56,6 +56,9 @@ redhat_package_dependencies:
|
||||||
- ntp
|
- ntp
|
||||||
- python-setuptools
|
- python-setuptools
|
||||||
|
|
||||||
|
# Enable the ntp service by default to avoid clock skew on
|
||||||
|
# ceph nodes
|
||||||
|
ntp_service_enabled: true
|
||||||
|
|
||||||
# The list of ceph packages needed for debian.
|
# The list of ceph packages needed for debian.
|
||||||
# This variable should only be changed if packages are not available from a given
|
# This variable should only be changed if packages are not available from a given
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
- name: check ntp installation on debian
|
||||||
|
command: dpkg -s ntp
|
||||||
|
register: ntp_pkg_query
|
||||||
|
ignore_errors: true
|
||||||
|
changed_when: false
|
||||||
|
when: ansible_os_family == 'Debian'
|
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
- name: check ntp installation on redhat
|
||||||
|
command: rpm -q ntp
|
||||||
|
register: ntp_pkg_query
|
||||||
|
ignore_errors: true
|
||||||
|
changed_when: false
|
||||||
|
when: ansible_os_family == 'RedHat'
|
|
@ -71,6 +71,16 @@
|
||||||
tags:
|
tags:
|
||||||
- package-install
|
- package-install
|
||||||
|
|
||||||
|
- include: ./misc/ntp_redhat.yml
|
||||||
|
when:
|
||||||
|
- ansible_os_family == 'RedHat'
|
||||||
|
- ntp_service_enabled
|
||||||
|
|
||||||
|
- include: ./misc/ntp_debian.yml
|
||||||
|
when:
|
||||||
|
- ansible_os_family == 'Debian'
|
||||||
|
- ntp_service_enabled
|
||||||
|
|
||||||
- include: facts.yml
|
- include: facts.yml
|
||||||
|
|
||||||
- set_fact:
|
- set_fact:
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
---
|
||||||
|
- include: ../checks/check_ntp_debian.yml
|
||||||
|
when: ansible_os_family == 'Debian'
|
||||||
|
|
||||||
|
- name: start the ntp service
|
||||||
|
service:
|
||||||
|
name: ntp
|
||||||
|
enabled: yes
|
||||||
|
state: started
|
||||||
|
when:
|
||||||
|
- ntp_pkg_query.rc == 0
|
|
@ -0,0 +1,11 @@
|
||||||
|
---
|
||||||
|
- include: ../checks/check_ntp_redhat.yml
|
||||||
|
when: ansible_os_family == 'RedHat'
|
||||||
|
|
||||||
|
- name: start the ntp service
|
||||||
|
service:
|
||||||
|
name: ntpd
|
||||||
|
enabled: yes
|
||||||
|
state: started
|
||||||
|
when:
|
||||||
|
- ntp_pkg_query.rc == 0
|
Loading…
Reference in New Issue