Do not install ntp package on host when not used

This could badly affect containerized chrony
on Debian family distros.

Adapted for Stein which did not allow empty package names
as skipped.
Rocky, on the other hand, has already been patched with
this functionality due to Ceph on CentOS.

Change-Id: I3c57c0fe254b6166db55fa33358be646a4a23192
Closes-bug: #1847863
(cherry picked from commit e91860c35750879078d4e219bf57c329436edbbe)
This commit is contained in:
Radosław Piliszek 2019-10-12 17:11:41 +02:00
parent 8320b07197
commit a1d58df74a
2 changed files with 5 additions and 3 deletions

View File

@ -85,14 +85,14 @@ debian_pkg_install:
- git
- "{% if not easy_install_available %}python-pip{% endif %}"
- python-setuptools
- ntp
- "{% if enable_host_ntp | bool %}ntp{% endif %}"
- "{% if enable_ceph_nfs|bool %}rpcbind{% endif %}"
redhat_pkg_install:
- "{{ docker_yum_package }}"
- git
- python-setuptools
- ntp
- "{% if enable_host_ntp | bool %}ntp{% endif %}"
- sudo
ubuntu_pkg_removals:

View File

@ -74,7 +74,9 @@
update_cache: yes
become: True
with_items: "{{ redhat_pkg_install }}"
when: ansible_os_family == 'RedHat'
when:
- ansible_os_family == 'RedHat'
- item != ""
register: yum_install_result
# If any packages were updated, and any containers were running, wait for the