summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Tanner <tanner.jc@gmail.com>2013-11-22 12:13:24 -0500
committerJames Tanner <tanner.jc@gmail.com>2013-11-22 12:13:24 -0500
commita16fe923ede8e3ab0e072bbb3006ca3ff1f3727a (patch)
tree71cb5e7b7d60c063b043c445c071df4712dea9d3
parent1aa1e53d124c0f95d48640d13a20d5bfdaaa29f2 (diff)
downloadansible-a16fe923ede8e3ab0e072bbb3006ca3ff1f3727a.tar.gz
Addresses #5011 check for proper string in smartos ssh error output
-rw-r--r--lib/ansible/runner/connection_plugins/ssh.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ansible/runner/connection_plugins/ssh.py b/lib/ansible/runner/connection_plugins/ssh.py
index 1b42bc0cf1..28e4ad5f4c 100644
--- a/lib/ansible/runner/connection_plugins/ssh.py
+++ b/lib/ansible/runner/connection_plugins/ssh.py
@@ -247,8 +247,8 @@ class Connection(object):
# the host to known hosts is not intermingled with multiprocess output.
fcntl.lockf(self.runner.output_lockfile, fcntl.LOCK_UN)
fcntl.lockf(self.runner.process_lockfile, fcntl.LOCK_UN)
-
- if p.returncode != 0 and stderr.find('Bad configuration option: ControlPersist') != -1:
+ controlpersisterror = stderr.find('Bad configuration option: ControlPersist') or stderr.find('unknown configuration option: ControlPersist') != -1
+ if p.returncode != 0 and controlpersisterror:
raise errors.AnsibleError('using -c ssh on certain older ssh versions may not support ControlPersist, set ANSIBLE_SSH_ARGS="" (or ansible_ssh_args in the config file) before running again')
return (p.returncode, '', stdout, stderr)