Merge "Don't use easy_install on Ubuntu 18+"

This commit is contained in:
Zuul 2019-04-10 06:12:48 +00:00 committed by Gerrit Code Review
commit 69ded017af
2 changed files with 8 additions and 0 deletions

View File

@ -68,9 +68,16 @@ docker_custom_option: ""
docker_runtime_directory: ""
# Ubuntu 18+ does not have easy_install available due to
# https://bugs.launchpad.net/ubuntu/+source/python-setuptools/+bug/1774419.
easy_install_available: >-
{{ ansible_distribution != 'Ubuntu' or
ansible_distribution_major_version is version(18, 'lt') }}
debian_pkg_install:
- "{{ docker_apt_package }}"
- git
- "{% if not easy_install_available %}python-pip{% endif %}"
- python-setuptools
- ntp

View File

@ -108,6 +108,7 @@
virtualenv: "{{ virtualenv is none | ternary(omit, virtualenv) }}"
virtualenv_site_packages: "{{ virtualenv is none | ternary(omit, virtualenv_site_packages) }}"
become: True
when: easy_install_available
- name: Install latest pip in the virtualenv
pip: