calvinbui.ansible_pip
Ansible pip
Ansible pip is a tool that helps install Python 3's pip
, setuptools
, and other packages.
It sets up the Python package manager pip3
according to the specified version or defaults to the version of Python that Ansible finds.
You can also install other pip packages using options provided by the pip module.
Requirements
No specific requirements.
Role Variables
pip_install_packages
: This is a list of packages you want to install using the pip module. If you don't need any packages, set it to []
.
You can use any options from the pip module. Just set them the same way, like this:
pip_install_packages:
- name: virtualenv
- name: pyyaml
state: present
- ...
Notes:
- The
executable
option will use the pip version that is being installed by default. You can change it by providing another pipexecutable
. - The
executable
will try to use the correctsetuptools
for the version of Ansible running on the remote machine. This will be managed by following the table below:
Local Python | Remote Python | Executable | Requirements |
---|---|---|---|
2 | 2 | 2 | None |
2 | 2 | 3 | Installs setuptools for Python 2 |
2 | 3 | 3 | None |
2 | 3 | 2 | Installs setuptools for Python 3 |
3 | 2 | 2 | None |
3 | 2 | 3 | Installs setuptools for Python 2 |
3 | 3 | 3 | None |
3 | 3 | 2 | Installs setuptools for Python 3 |
Dependencies
No specific dependencies.
Example Playbook
- hosts: all
become: true
pre_tasks:
- name: Update apt cache.
apt:
update_cache: true
cache_valid_time: 600
changed_when: false
roles:
- role: ansible-pip
License
This project is licensed under GPLv3.
Author Information
You can find more about the author at calvin.me.
Installa
ansible-galaxy install calvinbui.ansible_pip
Licenza
Unknown
Download
7.5k
Proprietario
Soft tabs > spaces > tabs. I'm not a developer.