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 <seb@redhat.com>
12 files changed:
---
- name: check ntp installation on atomic
command: rpm -q chrony
- register: ntp_pkg_query
ignore_errors: true
always_run: true
changed_when: false
---
- name: check ntp installation on debian
command: dpkg -s ntp
- register: ntp_pkg_query
ignore_errors: true
always_run: true
changed_when: false
---
- name: check ntp installation on redhat
command: rpm -q ntp
- register: ntp_pkg_query
ignore_errors: true
always_run: true
changed_when: false
name: chronyd
enabled: yes
state: started
- when:
- - ntp_pkg_query.rc == 0
name: ntp
enabled: yes
state: started
- when:
- - ntp_pkg_query.rc == 0
name: ntpd
enabled: yes
state: started
- when:
- - ntp_pkg_query.rc == 0
---
- name: check ntp installation on atomic
command: rpm -q chrony
- register: ntp_pkg_query
ignore_errors: true
always_run: true
changed_when: false
---
- name: check ntp installation on debian
command: dpkg -s ntp
- register: ntp_pkg_query
ignore_errors: true
always_run: true
changed_when: false
---
- name: check ntp installation on redhat
command: rpm -q ntp
- register: ntp_pkg_query
ignore_errors: true
always_run: true
changed_when: false
name: chronyd
enabled: yes
state: started
- when:
- - ntp_pkg_query.rc == 0
name: ntp
enabled: yes
state: started
- when:
- - ntp_pkg_query.rc == 0
name: ntpd
enabled: yes
state: started
- when:
- - ntp_pkg_query.rc == 0