Merge pull request #630 from cocoy/ssh-ubuntu
Suppress Ubuntu ssh -tt getting ioctl error.
This commit is contained in:
commit
31b6c1c28e
1 changed files with 2 additions and 0 deletions
|
@ -104,6 +104,8 @@ class SSHConnection(object):
|
||||||
stdout += os.read(p.stdout.fileno(), 1024)
|
stdout += os.read(p.stdout.fileno(), 1024)
|
||||||
# older versions of ssh generate this error which we ignore
|
# older versions of ssh generate this error which we ignore
|
||||||
stdout=stdout.replace("tcgetattr: Invalid argument\n", "")
|
stdout=stdout.replace("tcgetattr: Invalid argument\n", "")
|
||||||
|
# suppress Ubuntu 10.04/12.04 error on -tt option
|
||||||
|
stdout=stdout.replace("tcgetattr: Inappropriate ioctl for device\n","")
|
||||||
|
|
||||||
if p.returncode != 0 and stdout.find('Bad configuration option: ControlPersist') != -1:
|
if p.returncode != 0 and stdout.find('Bad configuration option: ControlPersist') != -1:
|
||||||
raise errors.AnsibleError('using -c ssh on certain older ssh versions may not support ControlPersist, set ANSIBLE_SSH_ARGS="" before running again')
|
raise errors.AnsibleError('using -c ssh on certain older ssh versions may not support ControlPersist, set ANSIBLE_SSH_ARGS="" before running again')
|
||||||
|
|
Loading…
Reference in a new issue