From 177d6687cc3a86d413734b2546033ada0611cd66 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Han?= Date: Tue, 16 Jan 2018 17:43:54 +0100 Subject: [PATCH] common/docker-common: always start ntp MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit There is no need to only start ntp only if the package was present. If the package is not present, we install it AND eventually activate + run the service. The original fix is part of this commit: https://github.com/ceph/ceph-ansible/commit/849786967ac4c6235e624243019f0b54bf3340a4 However, this is a feature addition so it cannot be backported. Hence this commit. Signed-off-by: Sébastien Han --- roles/ceph-common/tasks/checks/check_ntp_atomic.yml | 1 - roles/ceph-common/tasks/checks/check_ntp_debian.yml | 1 - roles/ceph-common/tasks/checks/check_ntp_redhat.yml | 1 - roles/ceph-common/tasks/misc/ntp_atomic.yml | 2 -- roles/ceph-common/tasks/misc/ntp_debian.yml | 2 -- roles/ceph-common/tasks/misc/ntp_redhat.yml | 2 -- roles/ceph-docker-common/tasks/checks/check_ntp_atomic.yml | 1 - roles/ceph-docker-common/tasks/checks/check_ntp_debian.yml | 1 - roles/ceph-docker-common/tasks/checks/check_ntp_redhat.yml | 1 - roles/ceph-docker-common/tasks/misc/ntp_atomic.yml | 2 -- roles/ceph-docker-common/tasks/misc/ntp_debian.yml | 2 -- roles/ceph-docker-common/tasks/misc/ntp_redhat.yml | 2 -- 12 files changed, 18 deletions(-) diff --git a/roles/ceph-common/tasks/checks/check_ntp_atomic.yml b/roles/ceph-common/tasks/checks/check_ntp_atomic.yml index 32050835e..92f93d5d4 100644 --- a/roles/ceph-common/tasks/checks/check_ntp_atomic.yml +++ b/roles/ceph-common/tasks/checks/check_ntp_atomic.yml @@ -1,7 +1,6 @@ --- - name: check ntp installation on atomic command: rpm -q chrony - register: ntp_pkg_query ignore_errors: true always_run: true changed_when: false diff --git a/roles/ceph-common/tasks/checks/check_ntp_debian.yml b/roles/ceph-common/tasks/checks/check_ntp_debian.yml index c666958ca..65c9b6c3e 100644 --- a/roles/ceph-common/tasks/checks/check_ntp_debian.yml +++ b/roles/ceph-common/tasks/checks/check_ntp_debian.yml @@ -1,7 +1,6 @@ --- - name: check ntp installation on debian command: dpkg -s ntp - register: ntp_pkg_query ignore_errors: true always_run: true changed_when: false diff --git a/roles/ceph-common/tasks/checks/check_ntp_redhat.yml b/roles/ceph-common/tasks/checks/check_ntp_redhat.yml index 2a957b455..32d9fbef6 100644 --- a/roles/ceph-common/tasks/checks/check_ntp_redhat.yml +++ b/roles/ceph-common/tasks/checks/check_ntp_redhat.yml @@ -1,7 +1,6 @@ --- - name: check ntp installation on redhat command: rpm -q ntp - register: ntp_pkg_query ignore_errors: true always_run: true changed_when: false diff --git a/roles/ceph-common/tasks/misc/ntp_atomic.yml b/roles/ceph-common/tasks/misc/ntp_atomic.yml index 4da8abe84..09967a35e 100644 --- a/roles/ceph-common/tasks/misc/ntp_atomic.yml +++ b/roles/ceph-common/tasks/misc/ntp_atomic.yml @@ -9,5 +9,3 @@ name: chronyd enabled: yes state: started - when: - - ntp_pkg_query.rc == 0 diff --git a/roles/ceph-common/tasks/misc/ntp_debian.yml b/roles/ceph-common/tasks/misc/ntp_debian.yml index 7eab2e410..c0d7ae61a 100644 --- a/roles/ceph-common/tasks/misc/ntp_debian.yml +++ b/roles/ceph-common/tasks/misc/ntp_debian.yml @@ -9,5 +9,3 @@ name: ntp enabled: yes state: started - when: - - ntp_pkg_query.rc == 0 diff --git a/roles/ceph-common/tasks/misc/ntp_redhat.yml b/roles/ceph-common/tasks/misc/ntp_redhat.yml index 332841b9c..37e4ef1ab 100644 --- a/roles/ceph-common/tasks/misc/ntp_redhat.yml +++ b/roles/ceph-common/tasks/misc/ntp_redhat.yml @@ -9,5 +9,3 @@ name: ntpd enabled: yes state: started - when: - - ntp_pkg_query.rc == 0 diff --git a/roles/ceph-docker-common/tasks/checks/check_ntp_atomic.yml b/roles/ceph-docker-common/tasks/checks/check_ntp_atomic.yml index 32050835e..92f93d5d4 100644 --- a/roles/ceph-docker-common/tasks/checks/check_ntp_atomic.yml +++ b/roles/ceph-docker-common/tasks/checks/check_ntp_atomic.yml @@ -1,7 +1,6 @@ --- - name: check ntp installation on atomic command: rpm -q chrony - register: ntp_pkg_query ignore_errors: true always_run: true changed_when: false diff --git a/roles/ceph-docker-common/tasks/checks/check_ntp_debian.yml b/roles/ceph-docker-common/tasks/checks/check_ntp_debian.yml index c666958ca..65c9b6c3e 100644 --- a/roles/ceph-docker-common/tasks/checks/check_ntp_debian.yml +++ b/roles/ceph-docker-common/tasks/checks/check_ntp_debian.yml @@ -1,7 +1,6 @@ --- - name: check ntp installation on debian command: dpkg -s ntp - register: ntp_pkg_query ignore_errors: true always_run: true changed_when: false diff --git a/roles/ceph-docker-common/tasks/checks/check_ntp_redhat.yml b/roles/ceph-docker-common/tasks/checks/check_ntp_redhat.yml index 2a957b455..32d9fbef6 100644 --- a/roles/ceph-docker-common/tasks/checks/check_ntp_redhat.yml +++ b/roles/ceph-docker-common/tasks/checks/check_ntp_redhat.yml @@ -1,7 +1,6 @@ --- - name: check ntp installation on redhat command: rpm -q ntp - register: ntp_pkg_query ignore_errors: true always_run: true changed_when: false diff --git a/roles/ceph-docker-common/tasks/misc/ntp_atomic.yml b/roles/ceph-docker-common/tasks/misc/ntp_atomic.yml index b8a753450..176c75a5f 100644 --- a/roles/ceph-docker-common/tasks/misc/ntp_atomic.yml +++ b/roles/ceph-docker-common/tasks/misc/ntp_atomic.yml @@ -8,5 +8,3 @@ name: chronyd enabled: yes state: started - when: - - ntp_pkg_query.rc == 0 diff --git a/roles/ceph-docker-common/tasks/misc/ntp_debian.yml b/roles/ceph-docker-common/tasks/misc/ntp_debian.yml index 7eab2e410..c0d7ae61a 100644 --- a/roles/ceph-docker-common/tasks/misc/ntp_debian.yml +++ b/roles/ceph-docker-common/tasks/misc/ntp_debian.yml @@ -9,5 +9,3 @@ name: ntp enabled: yes state: started - when: - - ntp_pkg_query.rc == 0 diff --git a/roles/ceph-docker-common/tasks/misc/ntp_redhat.yml b/roles/ceph-docker-common/tasks/misc/ntp_redhat.yml index 332841b9c..37e4ef1ab 100644 --- a/roles/ceph-docker-common/tasks/misc/ntp_redhat.yml +++ b/roles/ceph-docker-common/tasks/misc/ntp_redhat.yml @@ -9,5 +9,3 @@ name: ntpd enabled: yes state: started - when: - - ntp_pkg_query.rc == 0 -- 2.47.3