task that removes info of deb packages.

This commit is contained in:
Andrea Dell'Amico 2021-06-23 17:47:17 +02:00
parent df876f6bbf
commit cf06318594
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
2 changed files with 10 additions and 0 deletions

View File

@ -19,6 +19,12 @@
apt: name=python3-pip state={{ py3_env_pkgs_state }} update_cache=yes cache_valid_time=600
when: ansible_distribution_version is version_compare('18.04', '>=')
- name: Remove info of deb python packages so that they can be upgraded using pip
file:
dest: '{{ item }}'
state: absent
loop: '{{ py3_deb_info_to_remove }}'
- name: Install the correct pip3 version on Ubuntu < 18.04
shell: python{{ py3_env_version }} -m ensurepip && pip{{ py3_env_version }} install --upgrade pip setuptools wheel
when: ansible_distribution_version is version_compare('18.04', '<')

View File

@ -6,6 +6,10 @@ py3_env_mandatory_dpkg:
- 'python{{ py3_env_version }}-venv'
- 'python{{ py3_env_version }}-dev'
# Ugly. Don't do that
py3_deb_info_to_remove: []
# - '/usr/lib/python3/dist-packages/geopandas-0.3.0.egg-info'
py3_env_pip_default_pkgs:
- 'pip'
- 'setuptools'