From e5664c45a5b0b3547301f39f82a7fddb98f0ded2 Mon Sep 17 00:00:00 2001 From: AndyG Date: Thu, 25 Oct 2018 20:29:01 +0100 Subject: [PATCH] Update pip.py (#47568) adding the option to install pip modules via proxy, as per https://github.com/ansible/ansible/issues/36333#issuecomment-366374083 --- lib/ansible/modules/packaging/language/pip.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/ansible/modules/packaging/language/pip.py b/lib/ansible/modules/packaging/language/pip.py index 5cc330cf5d..1bae77e95c 100644 --- a/lib/ansible/modules/packaging/language/pip.py +++ b/lib/ansible/modules/packaging/language/pip.py @@ -135,6 +135,13 @@ EXAMPLES = ''' - django>1.11.0,<1.12.0 - bottle>0.10,<0.20,!=0.11 +# Install python package using a proxy - it doesn't use the standard environment variables, please use the CAPITALIZED ones below +- pip: + name: six + environment: + HTTP_PROXY: '127.0.0.1:8080' + HTTPS_PROXY: '127.0.0.1:8080' + # Install (MyApp) using one of the remote protocols (bzr+,hg+,git+,svn+). You do not have to supply '-e' option in extra_args. - pip: name: svn+http://myrepo/svn/MyApp#egg=MyApp