mirror of
https://github.com/geerlingguy/ansible-role-pip.git
synced 2025-02-21 01:51:41 +01:00
Merge pull request #18 from slavoutich/centos7
Add ability to use the role on CentOS 7
This commit is contained in:
commit
87179db548
@ -18,6 +18,11 @@ The name of the packge to install to get `pip` on the system. You can set to `py
|
||||
|
||||
pip_install_packages: []
|
||||
|
||||
The role will try to autodetect pip executable: it will use `pip` for Python 2 and `pip3` for Python 3. You can also override this explicitly:
|
||||
|
||||
pip_executable: pip3.6
|
||||
|
||||
|
||||
A list of packages to install with pip. Examples below:
|
||||
|
||||
pip_install_packages:
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
# For Python 3, use python3-pip.
|
||||
pip_package: python-pip
|
||||
|
||||
pip_executable: "{{ 'pip3' if pip_package.startswith('python3') else 'pip' }}"
|
||||
pip_install_packages: []
|
||||
|
@ -10,5 +10,5 @@
|
||||
version: "{{ item.version | default(omit) }}"
|
||||
virtualenv: "{{ item.virtualenv | default(omit) }}"
|
||||
state: "{{ item.state | default(omit) }}"
|
||||
executable: "{{ 'pip3' if pip_package == 'python3-pip' else 'pip' }}"
|
||||
executable: "{{ pip_executable }}"
|
||||
with_items: "{{ pip_install_packages }}"
|
||||
|
Loading…
Reference in New Issue
Block a user