mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 14:40:19 -07:00
Merge pull request #836 from sfromm/rawfixes
Fixes for raw module usage and failure to open_session()
This commit is contained in:
commit
a7415e5409
2 changed files with 12 additions and 3 deletions
|
@ -84,7 +84,13 @@ class ParamikoConnection(object):
|
|||
''' run a command on the remote host '''
|
||||
|
||||
bufsize = 4096
|
||||
chan = self.ssh.get_transport().open_session()
|
||||
try:
|
||||
chan = self.ssh.get_transport().open_session()
|
||||
except Exception, e:
|
||||
msg = "Failed to open session"
|
||||
if len(str(e)) > 0:
|
||||
msg += ": %s" % str(e)
|
||||
raise errors.AnsibleConnectionFailed(msg)
|
||||
chan.get_pty()
|
||||
|
||||
if not self.runner.sudo or not sudoable:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue