mirror of
https://github.com/geerlingguy/ansible-role-pip.git
synced 2024-11-15 10:35:10 +01:00
parent
4190afbfb9
commit
65eddfe604
20
README.md
20
README.md
@ -12,19 +12,13 @@ On RedHat/CentOS, you may need to have EPEL installed before running this role.
|
||||
|
||||
Available variables are listed below, along with default values (see `defaults/main.yml`):
|
||||
|
||||
The name of the packge to install to get `pip` on the system.
|
||||
pip_package: python-pip
|
||||
|
||||
pip_package_name: python-pip
|
||||
|
||||
For example:
|
||||
|
||||
pip_package_name: python3-pip
|
||||
|
||||
A list of packages to install with pip.
|
||||
The name of the packge to install to get `pip` on the system. You can set to `python3-pip`, for example, when using Python 3 on Ubuntu.
|
||||
|
||||
pip_install_packages: []
|
||||
|
||||
Examples below:
|
||||
A list of packages to install with pip. Examples below:
|
||||
|
||||
pip_install_packages:
|
||||
# Specify names and versions.
|
||||
@ -32,19 +26,19 @@ Examples below:
|
||||
version: "1.2.3"
|
||||
- name: awscli
|
||||
version: "1.11.91"
|
||||
|
||||
|
||||
# Or specify bare packages to get the latest release.
|
||||
- docker
|
||||
- awscli
|
||||
|
||||
|
||||
# Or uninstall a package.
|
||||
- name: docker
|
||||
state: absent
|
||||
|
||||
|
||||
# Or update a package ot the latest version.
|
||||
- name: docker
|
||||
state: latest
|
||||
|
||||
|
||||
# Or force a reinstall.
|
||||
- name: docker
|
||||
state: forcereinstall
|
||||
|
@ -1,3 +1,5 @@
|
||||
---
|
||||
pip_package_name: python-pip
|
||||
# For Python 3, use python3-pip.
|
||||
pip_package: python-pip
|
||||
|
||||
pip_install_packages: []
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
- name: Ensure Pip is installed.
|
||||
package:
|
||||
name: "{{pip_package_name}}"
|
||||
name: "{{ pip_package }}"
|
||||
state: present
|
||||
|
||||
- name: Ensure pip_install_packages are installed.
|
||||
|
Loading…
Reference in New Issue
Block a user