Not a full port to v2's api, just a few fixups
This commit is contained in:
parent
6a8062baad
commit
bf003d31e0
1 changed files with 9 additions and 3 deletions
|
@ -26,8 +26,9 @@ import struct
|
|||
import time
|
||||
from ansible.callbacks import vvv, vvvv
|
||||
from ansible.errors import AnsibleError, AnsibleFileNotFound
|
||||
from ansible.runner.connection_plugins.ssh import Connection as SSHConnection
|
||||
from ansible.runner.connection_plugins.paramiko_ssh import Connection as ParamikoConnection
|
||||
from . import ConnectionBase
|
||||
from .ssh import Connection as SSHConnection
|
||||
from .paramiko_ssh import Connection as ParamikoConnection
|
||||
from ansible import utils
|
||||
from ansible import constants
|
||||
|
||||
|
@ -38,7 +39,7 @@ from ansible import constants
|
|||
# multiple of the value to speed up file reads.
|
||||
CHUNK_SIZE=1044*20
|
||||
|
||||
class Connection(object):
|
||||
class Connection(ConnectionBase):
|
||||
''' raw socket accelerated connection '''
|
||||
|
||||
def __init__(self, runner, host, port, user, password, private_key_file, *args, **kwargs):
|
||||
|
@ -91,6 +92,11 @@ class Connection(object):
|
|||
if getattr(self.runner, 'aes_keys', None):
|
||||
utils.AES_KEYS = self.runner.aes_keys
|
||||
|
||||
@property
|
||||
def transport(self):
|
||||
"""String used to identify this Connection class from other classes"""
|
||||
return 'accelerate'
|
||||
|
||||
def _execute_accelerate_module(self):
|
||||
args = "password=%s port=%s minutes=%d debug=%d ipv6=%s" % (
|
||||
base64.b64encode(self.key.__str__()),
|
||||
|
|
Loading…
Add table
Reference in a new issue