diff --git a/lib/ansible/executor/task_executor.py b/lib/ansible/executor/task_executor.py index 4b372cf4c7..f5a5a5000f 100644 --- a/lib/ansible/executor/task_executor.py +++ b/lib/ansible/executor/task_executor.py @@ -452,7 +452,7 @@ class TaskExecutor: try: cmd = subprocess.Popen(['ssh','-o','ControlPersist'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) (out, err) = cmd.communicate() - if "Bad configuration option" in err: + if "Bad configuration option" in err or "Usage:" in err: conn_type = "paramiko" except OSError: conn_type = "paramiko"