From: Sébastien Han Date: Tue, 16 Jan 2018 16:43:54 +0000 (+0100) Subject: common/docker-common: always start ntp X-Git-Tag: v3.0.18~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=177d6687cc3a86d413734b2546033ada0611cd66;p=ceph-ansible.git common/docker-common: always start ntp 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 --- 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