mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Removed unnecessary string replacements since parse_json already filters garbage lines
This commit is contained in:
parent
6b622beb4d
commit
ac44c36e4f
1 changed files with 1 additions and 5 deletions
|
@ -104,10 +104,6 @@ class SSHConnection(object):
|
||||||
if p.stdout in rfd:
|
if p.stdout in rfd:
|
||||||
stdout += os.read(p.stdout.fileno(), 1024)
|
stdout += os.read(p.stdout.fileno(), 1024)
|
||||||
p.stdin.close() # close stdin after we read from stdout (see also issue #848)
|
p.stdin.close() # close stdin after we read from stdout (see also issue #848)
|
||||||
# older versions of ssh generate this error which we ignore
|
|
||||||
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