Don't use easy_install on Ubuntu 18+
Currently easy_install is not available on Ubuntu 18+ due to [1]. In that case, install pip via apt rather than easy_install. [1] https://bugs.launchpad.net/ubuntu/+source/python-setuptools/+bug/1774419 Change-Id: Id358fdb655d71490b0915680dff131cfe33f4a40 Closes-Bug: #1813492
This commit is contained in:
parent
ce6222ae8b
commit
c1c02f67dc
@ -68,9 +68,16 @@ docker_custom_option: ""
|
|||||||
|
|
||||||
docker_runtime_directory: ""
|
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:
|
debian_pkg_install:
|
||||||
- "{{ docker_apt_package }}"
|
- "{{ docker_apt_package }}"
|
||||||
- git
|
- git
|
||||||
|
- "{% if not easy_install_available %}python-pip{% endif %}"
|
||||||
- python-setuptools
|
- python-setuptools
|
||||||
- ntp
|
- ntp
|
||||||
|
|
||||||
|
@ -108,6 +108,7 @@
|
|||||||
virtualenv: "{{ virtualenv is none | ternary(omit, virtualenv) }}"
|
virtualenv: "{{ virtualenv is none | ternary(omit, virtualenv) }}"
|
||||||
virtualenv_site_packages: "{{ virtualenv is none | ternary(omit, virtualenv_site_packages) }}"
|
virtualenv_site_packages: "{{ virtualenv is none | ternary(omit, virtualenv_site_packages) }}"
|
||||||
become: True
|
become: True
|
||||||
|
when: easy_install_available
|
||||||
|
|
||||||
- name: Install latest pip in the virtualenv
|
- name: Install latest pip in the virtualenv
|
||||||
pip:
|
pip:
|
||||||
|
Loading…
Reference in New Issue
Block a user