mirror of https://github.com/ceph/ceph-ansible.git
commit
48599c07cc
|
@ -65,6 +65,9 @@ dummy:
|
|||
# - ntp
|
||||
# - 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.
|
||||
# This variable should only be changed if packages are not available from a given
|
||||
|
|
|
@ -57,6 +57,9 @@ redhat_package_dependencies:
|
|||
- ntp
|
||||
- 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.
|
||||
# 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'
|
|
@ -73,6 +73,16 @@
|
|||
tags:
|
||||
- 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
|
||||
|
||||
- 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