feat: add option for pip-envrionment-variables

This commit is contained in:
Jadyn Emma Jaeger 2021-12-07 10:43:54 +01:00
parent 6e819c0e97
commit 57e310076f
No known key found for this signature in database
GPG Key ID: 632410170049FDDA
3 changed files with 10 additions and 0 deletions

View File

@ -51,6 +51,14 @@ A list of packages to install with pip. Examples below:
- name: docker
virtualenv: /my_app/venv
To pass environment variables to `pip` use `pip_environment_variables`. (This is usefull for proxy configuration)
```
pip_environment_variables:
http_proxy: "proxy.example.com"
```
## Dependencies
None.

View File

@ -2,5 +2,6 @@
# For Python 3, use python3-pip.
pip_package: python3-pip
pip_executable: "{{ 'pip3' if pip_package.startswith('python3') else 'pip' }}"
pip_environment_variables: []
pip_install_packages: []

View File

@ -12,3 +12,4 @@
state: "{{ item.state | default(omit) }}"
executable: "{{ pip_executable }}"
loop: "{{ pip_install_packages }}"
environment: "{{ pip_environment_variables }}"