5068744eff
This role is intended to ensure that the `pip:` module, and jobs that may wish to use `pip` from the shell, have the necessary requirements. It is intended as a partial replacement for the pip-and-virtualenv element in diskimage-builder, which currently pre-installs pip on our infra CI images during image build. We wish to remain broady compatible with this element, but not replicate some of the more problematic areas of its implementation. By default, this installs the system packages for pip and setuptools (the latter being a requirement of the Ansible pip module, which imports it directly, despite pip itself not requiring it). In this role, we ensure the libraries for the currently running ansible_python_interpreter version are installed. There is provision to provide a flag to install the packages directly from upstream via get-pip.py, although this is not recommended. Story: #2007386 Task: #39309 Change-Id: Iac2d518a66caf1b801273225f75a0a748412903c
12 lines
211 B
YAML
12 lines
211 B
YAML
- name: Install Python 3 pip
|
|
package:
|
|
name: dev-python/pip
|
|
become: yes
|
|
|
|
- name: Install Python 2 pip
|
|
package:
|
|
name: dev-python/pip
|
|
become: yes
|
|
when:
|
|
- ensure_pip_from_packages_with_python2
|