From 4e62627202825c3bd3134a9df5395c98231aa5a7 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Tue, 28 Mar 2017 17:45:09 +0200 Subject: [PATCH] Common: Do not install ntp when ntp_service_enabled is false ntp is still installed even if ntp_service_enabled is set to false. That could be a problem if the time synchronization is managed by something else than ceph-ansible or if you want to use different NTP implementation as suggested in #1354. Fixes: #1354 Signed-off-by: Guillaume Abrioux Signed-off-by: Guits --- group_vars/all.yml.sample | 3 --- roles/ceph-common/defaults/main.yml | 3 --- roles/ceph-common/tasks/checks/check_ntp_debian.yml | 5 +++++ roles/ceph-common/tasks/checks/check_ntp_redhat.yml | 5 +++++ 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/group_vars/all.yml.sample b/group_vars/all.yml.sample index c56ba8063..870c421ab 100644 --- a/group_vars/all.yml.sample +++ b/group_vars/all.yml.sample @@ -56,20 +56,17 @@ dummy: #debian_package_dependencies: # - python-pycurl # - hdparm -# - ntp #centos_package_dependencies: # - python-pycurl # - hdparm # - epel-release -# - ntp # - python-setuptools # - libselinux-python #redhat_package_dependencies: # - python-pycurl # - hdparm -# - ntp # - python-setuptools # Enable the ntp service by default to avoid clock skew on diff --git a/roles/ceph-common/defaults/main.yml b/roles/ceph-common/defaults/main.yml index c3753cba8..7cdb24fca 100644 --- a/roles/ceph-common/defaults/main.yml +++ b/roles/ceph-common/defaults/main.yml @@ -48,20 +48,17 @@ upgrade_ceph_packages: False debian_package_dependencies: - python-pycurl - hdparm - - ntp centos_package_dependencies: - python-pycurl - hdparm - epel-release - - ntp - python-setuptools - libselinux-python redhat_package_dependencies: - python-pycurl - hdparm - - ntp - python-setuptools # Enable the ntp service by default to avoid clock skew on diff --git a/roles/ceph-common/tasks/checks/check_ntp_debian.yml b/roles/ceph-common/tasks/checks/check_ntp_debian.yml index dc17abce0..7da8f5bee 100644 --- a/roles/ceph-common/tasks/checks/check_ntp_debian.yml +++ b/roles/ceph-common/tasks/checks/check_ntp_debian.yml @@ -6,3 +6,8 @@ always_run: true changed_when: false when: ansible_os_family == 'Debian' + +- name: install ntp on debian + package: + name: ntp + state: present diff --git a/roles/ceph-common/tasks/checks/check_ntp_redhat.yml b/roles/ceph-common/tasks/checks/check_ntp_redhat.yml index 51f64400e..0e4772f54 100644 --- a/roles/ceph-common/tasks/checks/check_ntp_redhat.yml +++ b/roles/ceph-common/tasks/checks/check_ntp_redhat.yml @@ -6,3 +6,8 @@ always_run: true changed_when: false when: ansible_os_family == 'RedHat' + +- name: install ntp on redhat + package: + name: ntp + state: present -- 2.39.5