offline_pip
Offline pip
Ansible Role
Install Python pip into air-gapped and offline environments
Requirements
- Tested and probably requires Python 3
- Requires pip source archive somewhere on the local computer. See example how to specify
Role Variables
Check defaults/main.yml
for all variables.
How to use
- Install
ansible-galaxy install chaliy.offline_pip
- Download pip source archive. For example, from https://pypi.org/project/pip/#files
mkdir ./.offline
wget https://files.pythonhosted.org/packages/ce/ea/9b445176a65ae4ba22dce1d93e4b5fe182f953df71a145f557cffaffc1bf/pip-19.3.1.tar.gz -P ./.offline
- Optionally download wheels
pip wheel --wheel-dir=./.offline/wheels docker jsondiff
- Specify
pip_tar_path
,pip_wheels_path
andpip_names
in your playbook - Run playbook
NOTE: offline-playbook.yml is an example playbook that downloads pip and wheels offline
Example Playbook
- hosts: all
roles:
- role: chaliy.offline_pip
pip_tar_path: ./.offline/pip-19.3.1.tar.gz
- hosts: all
roles:
- role: chaliy.offline_pip
pip_tar_path: ./.offline/pip-19.3.1.tar.gz
pip_wheels_path: ./.offline/wheels
pip_names:
- docker
- jsondiff
Development
poetry install
make test
License
MIT (Except russians)
About
Install Python pip into air-gapped offline environments
Install
ansible-galaxy install chaliy/ansible-role-offline-pip
License
other
Downloads
27