@ -23,6 +23,7 @@ import struct
import time
import time
from ansible . callbacks import vvv
from ansible . callbacks import vvv
from ansible . runner . connection_plugins . ssh import Connection as SSHConnection
from ansible . runner . connection_plugins . ssh import Connection as SSHConnection
from ansible . runner . connection_plugins . paramiko_ssh import Connection as ParamikoConnection
from ansible import utils
from ansible import utils
from ansible import errors
from ansible import errors
from ansible import constants
from ansible import constants
@ -49,14 +50,24 @@ class Connection(object):
self . fbport = port [ 1 ]
self . fbport = port [ 1 ]
self . is_connected = False
self . is_connected = False
self . ssh = SSHConnection (
if self . runner . original_transport == " paramiko " :
runner = self . runner ,
self . ssh = ParamikoConnection (
host = self . host ,
runner = self . runner ,
port = self . port ,
host = self . host ,
user = self . user ,
port = self . port ,
password = password ,
user = self . user ,
private_key_file = private_key_file
password = password ,
)
private_key_file = private_key_file
)
else :
self . ssh = SSHConnection (
runner = self . runner ,
host = self . host ,
port = self . port ,
user = self . user ,
password = password ,
private_key_file = private_key_file
)
# attempt to work around shared-memory funness
# attempt to work around shared-memory funness
if getattr ( self . runner , ' aes_keys ' , None ) :
if getattr ( self . runner , ' aes_keys ' , None ) :