Merge "Only install the appropriate distro packages"

This commit is contained in:
Zuul 2018-10-25 16:38:34 +00:00 committed by Gerrit Code Review
commit d515b0d7ff
3 changed files with 4 additions and 3 deletions

View File

@ -26,7 +26,8 @@
#
# Distribution packages which must be installed
# on the host for the purpose of building the venv.
# on the host for the purpose of building the
# python wheels.
venv_build_distro_package_list: []
# Distribution packages which must be installed

View File

@ -20,7 +20,7 @@
- name: Install distro packages for venv build
package:
name: "{{ venv_build_distro_package_list + venv_install_distro_package_list }}"
name: "{{ (venv_build_host != inventory_hostname) | ternary(venv_install_distro_package_list, venv_build_distro_package_list + venv_install_distro_package_list) }}"
state: "{{ venv_distro_package_state }}"
update_cache: "{{ (ansible_pkg_mgr in ['apt', 'zypper']) | ternary('yes', omit) }}"
cache_valid_time: "{{ (ansible_pkg_mgr == 'apt') | ternary(venv_distro_cache_valid_time, omit) }}"

View File

@ -21,7 +21,7 @@
block:
- name: Install distro packages for wheel build
package:
name: "{{ venv_build_distro_package_list + venv_install_distro_package_list }}"
name: "{{ venv_build_distro_package_list }}"
state: "{{ venv_distro_package_state }}"
update_cache: "{{ (ansible_pkg_mgr in ['apt', 'zypper']) | ternary('yes', omit) }}"
cache_valid_time: "{{ (ansible_pkg_mgr == 'apt') | ternary(venv_distro_cache_valid_time, omit) }}"