https://github.com/darkwizard242/ansible-role-pip
Ansible role to install 'python3-pip' or 'python-pip' package.
https://github.com/darkwizard242/ansible-role-pip
Last synced: 3 months ago
JSON representation
Ansible role to install 'python3-pip' or 'python-pip' package.
- Host: GitHub
- URL: https://github.com/darkwizard242/ansible-role-pip
- Owner: darkwizard242
- License: mit
- Created: 2019-07-24T20:20:40.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-05-13T15:26:00.000Z (about 2 years ago)
- Last Synced: 2025-06-14T17:04:02.202Z (about 1 year ago)
- Homepage:
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
  
# Ansible Role: pip
Role to install (_by default_) [python3-pip package or python-pip package](https://pip.pypa.io/en/stable/) (_if passed as var_) on **Debian/Ubuntu** and **EL** systems.
## Requirements
None.
## Role Variables
Available variables are listed below (located in `defaults/main.yml`)
### Variables list:
```yaml
pip_app_package: python3-pip
pip_desired_state: present
pip_upgrade_version: latest
```
### Variables table:
Variable | Description
------------------- | ------------------------------------------------------------------------------------------------------------------------------
pip_app_package | Defined to dynamically provide package name i.e. **python3-pip** or **python-pip**
pip_desired_state | Defined to dynamically select whether to install (i.e. either `present` or `latest`) or uninstall (i.e. `absent`) the package.
pip_upgrade_version | Defined to dynamically select whether to upgrade pip after installation or not.
## Dependencies
None
## Example Playbook
For default behaviour of role (i.e. installation of **python3-pip** package) in ansible playbooks.
```yaml
- hosts: servers
roles:
- darkwizard242.pip
```
For customizing behavior of role (i.e. installation of latest **python-pip** package instead of **python3-pip**) in ansible playbooks.
```yaml
- hosts: servers
roles:
- darkwizard242.pip
vars:
pip_app_package: python-pip
```
For customizing behavior of role (i.e. un-installation of **python3-pip** package) in ansible playbooks.
```yaml
- hosts: servers
roles:
- darkwizard242.pip
vars:
desired_state: absent
```
## License
[MIT](https://github.com/darkwizard242/ansible-role-pip/blob/master/LICENSE)
## Author Information
This role was created by [Ali Muhammad](https://www.alimuhammad.dev/).