Browse Source

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
changes/66/690766/11
Monty Taylor 3 years ago
parent
commit
7c86c4d067
  1. 24
      playbooks/roles/pip3/tasks/main.yaml

24
playbooks/roles/pip3/tasks/main.yaml

@ -1,6 +1,26 @@
- name: Install pip and virtualenv
- name: Remove pip and virtualenv packages
package:
name:
- python3-pip
- 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…
Cancel
Save