mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Fixing a few bugs related to fireball2
* ssh port not being picked up, always uses default of 22 * forgot to 'import time' in the fireball2 connection plugin
This commit is contained in:
@@ -406,7 +406,7 @@ class Runner(object):
|
|||||||
|
|
||||||
host_variables = self.inventory.get_variables(host)
|
host_variables = self.inventory.get_variables(host)
|
||||||
host_connection = host_variables.get('ansible_connection', self.transport)
|
host_connection = host_variables.get('ansible_connection', self.transport)
|
||||||
if host_connection in [ 'paramiko', 'ssh' ]:
|
if host_connection in [ 'paramiko', 'ssh', 'fireball2' ]:
|
||||||
port = host_variables.get('ansible_ssh_port', self.remote_port)
|
port = host_variables.get('ansible_ssh_port', self.remote_port)
|
||||||
if port is None:
|
if port is None:
|
||||||
port = C.DEFAULT_REMOTE_PORT
|
port = C.DEFAULT_REMOTE_PORT
|
||||||
@@ -569,7 +569,7 @@ class Runner(object):
|
|||||||
actual_pass = inject.get('ansible_ssh_pass', self.remote_pass)
|
actual_pass = inject.get('ansible_ssh_pass', self.remote_pass)
|
||||||
actual_transport = inject.get('ansible_connection', self.transport)
|
actual_transport = inject.get('ansible_connection', self.transport)
|
||||||
actual_private_key_file = inject.get('ansible_ssh_private_key_file', self.private_key_file)
|
actual_private_key_file = inject.get('ansible_ssh_private_key_file', self.private_key_file)
|
||||||
if actual_transport in [ 'paramiko', 'ssh' ]:
|
if actual_transport in [ 'paramiko', 'ssh', 'fireball2' ]:
|
||||||
actual_port = inject.get('ansible_ssh_port', port)
|
actual_port = inject.get('ansible_ssh_port', port)
|
||||||
|
|
||||||
# the delegated host may have different SSH port configured, etc
|
# the delegated host may have different SSH port configured, etc
|
||||||
@@ -614,7 +614,7 @@ class Runner(object):
|
|||||||
# for fireball2, we stuff both ports into a single
|
# for fireball2, we stuff both ports into a single
|
||||||
# variable so that we don't have to mangle other function
|
# variable so that we don't have to mangle other function
|
||||||
# calls just to accomodate this one case
|
# calls just to accomodate this one case
|
||||||
actual_port = [port, self.accelerate_port]
|
actual_port = [actual_port, self.accelerate_port]
|
||||||
elif actual_port is not None:
|
elif actual_port is not None:
|
||||||
actual_port = int(actual_port)
|
actual_port = int(actual_port)
|
||||||
except ValueError, e:
|
except ValueError, e:
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import os
|
|||||||
import base64
|
import base64
|
||||||
import socket
|
import socket
|
||||||
import struct
|
import struct
|
||||||
|
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 import utils
|
from ansible import utils
|
||||||
|
|||||||
Reference in New Issue
Block a user