mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 19:31:26 -07:00
parent
d5ad3093d6
commit
51b595992b
11 changed files with 75 additions and 78 deletions
|
@ -35,7 +35,7 @@ def check_for_controlpersist(ssh_executable):
|
|||
|
||||
has_cp = True
|
||||
try:
|
||||
cmd = subprocess.Popen([ssh_executable,'-o','ControlPersist'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
cmd = subprocess.Popen([ssh_executable, '-o', 'ControlPersist'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
(out, err) = cmd.communicate()
|
||||
if b"Bad configuration option" in err or b"Usage:" in err:
|
||||
has_cp = False
|
||||
|
@ -44,4 +44,3 @@ def check_for_controlpersist(ssh_executable):
|
|||
|
||||
_HAS_CONTROLPERSIST[ssh_executable] = has_cp
|
||||
return has_cp
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue