From 6459bacb6b44cce518d6741800cc32076bb06f44 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 4 Oct 2017 10:10:18 -0400 Subject: [PATCH] Revert "fix git wrapper (#29069)" This reverts commit f8005d27379c4d67bc86cf6af83ba1b1823bb10f. fix needs to be rethought as it applies to only newer git versions and use of env shell breaks with non 'bourne compatible' shells --- lib/ansible/modules/source_control/git.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/ansible/modules/source_control/git.py b/lib/ansible/modules/source_control/git.py index 5ce8738daa9..49943311ff2 100644 --- a/lib/ansible/modules/source_control/git.py +++ b/lib/ansible/modules/source_control/git.py @@ -371,10 +371,9 @@ fi def set_git_ssh(ssh_wrapper, key_file, ssh_opts): - # git_ssh_command will override git_ssh, so only older git needs it + if os.environ.get("GIT_SSH"): + del os.environ["GIT_SSH"] os.environ["GIT_SSH"] = ssh_wrapper - # using shell to avoid 'noexec' issues if module temp dir is located in such a mount - os.environ["GIT_SSH_COMMAND"] = '%s %s' % (os.environ.get('SHELL', '/bin/sh'), ssh_wrapper) if os.environ.get("GIT_KEY"): del os.environ["GIT_KEY"]