Update pip3 role to install from get-pip.py
Our base images have pip pre-installed from get-pip. This means that the installation of pip and virtualenv from distro packages in the ansible is misleading. Update the role to match reality. Change-Id: I500b14f9f9df00b6e0c4f152f8b4c7faa1bb94d4
This commit is contained in:
parent
5de73f6c36
commit
7c86c4d067
@ -1,6 +1,26 @@
|
|||||||
- name: Install pip and virtualenv
|
- name: Remove pip and virtualenv packages
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- python3-pip
|
- python3-pip
|
||||||
- python3-virtualenv
|
- python3-virtualenv
|
||||||
state: present
|
state: absent
|
||||||
|
|
||||||
|
- name: Download get-pip.py
|
||||||
|
command: wget https://bootstrap.pypa.io/get-pip.py
|
||||||
|
args:
|
||||||
|
chdir: /var/lib
|
||||||
|
creates: /var/lib/get-pip.py
|
||||||
|
|
||||||
|
- name: Install pip
|
||||||
|
command: python3 /var/lib/get-pip.py
|
||||||
|
args:
|
||||||
|
creates: /usr/local/bin/pip3
|
||||||
|
|
||||||
|
- name: Install latest pip and virtualenv
|
||||||
|
pip:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: latest
|
||||||
|
executable: pip3
|
||||||
|
loop:
|
||||||
|
- pip
|
||||||
|
- virtualenv
|
||||||
|
Loading…
x
Reference in New Issue
Block a user