From d34f89a6fe6b2c054d83ad3023e926a78ab48278 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 7 Oct 2015 12:18:36 -0400 Subject: [PATCH] default chdir to tmpdir to avoid virtualenv issues --- lib/ansible/modules/packaging/language/pip.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ansible/modules/packaging/language/pip.py b/lib/ansible/modules/packaging/language/pip.py index 30adce43ef1..e587fad920f 100644 --- a/lib/ansible/modules/packaging/language/pip.py +++ b/lib/ansible/modules/packaging/language/pip.py @@ -258,6 +258,9 @@ def main(): if state == 'latest' and version is not None: module.fail_json(msg='version is incompatible with state=latest') + if chdir is None: + chdir = tempfile.gettempdir() + err = '' out = ''