From dd79d66dba688d8389cb80d79d2f7fc6da62d6fd Mon Sep 17 00:00:00 2001 From: David Hughes Date: Fri, 15 Mar 2013 15:05:21 -0700 Subject: [PATCH] Run pip command from the system's temp directory --- library/pip | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/pip b/library/pip index 76210c26182..8ad6b5fb991 100644 --- a/library/pip +++ b/library/pip @@ -19,6 +19,8 @@ # along with Ansible. If not, see . # +import tempfile + DOCUMENTATION = ''' --- module: pip @@ -217,6 +219,7 @@ def main(): if module.check_mode: module.exit_json(changed=True) + os.chdir(tempfile.gettempdir()) rc, out_pip, err_pip = module.run_command(cmd) out += out_pip err += err_pip