mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #2418 from davehughes/pip-fix-run-directory
pip module - run from the system's temp directory to avoid permissions problem
This commit is contained in:
commit
d4f7b45395
1 changed files with 3 additions and 0 deletions
|
@ -19,6 +19,8 @@
|
|||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue