mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
Added option to change ssh executable path (#17377)
This commit is contained in:
parent
07e713e7c6
commit
dd71469bb7
3 changed files with 10 additions and 5 deletions
|
@ -667,7 +667,8 @@ class TaskExecutor:
|
|||
else:
|
||||
# see if SSH can support ControlPersist if not use paramiko
|
||||
try:
|
||||
cmd = subprocess.Popen(['ssh','-o','ControlPersist'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
ssh_executable = C.ANSIBLE_SSH_EXECUTABLE
|
||||
cmd = subprocess.Popen([ssh_executable, '-o', 'ControlPersist'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
(out, err) = cmd.communicate()
|
||||
err = to_text(err)
|
||||
if u"Bad configuration option" in err or u"Usage:" in err:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue