mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Merge pull request #6224 from gildegoma/runner-connection-cleanup
Fully delete 'ssh_old' and 'paramiko_alt' options
This commit is contained in:
@@ -548,7 +548,7 @@ class Runner(object):
|
|||||||
|
|
||||||
host_variables = self.inventory.get_variables(host, vault_password=self.vault_pass)
|
host_variables = self.inventory.get_variables(host, vault_password=self.vault_pass)
|
||||||
host_connection = host_variables.get('ansible_connection', self.transport)
|
host_connection = host_variables.get('ansible_connection', self.transport)
|
||||||
if host_connection in [ 'paramiko', 'paramiko_alt', 'ssh', 'ssh_old', 'accelerate' ]:
|
if host_connection in [ 'paramiko', 'ssh', 'accelerate' ]:
|
||||||
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
|
||||||
@@ -742,7 +742,7 @@ class Runner(object):
|
|||||||
if not self.accelerate_port:
|
if not self.accelerate_port:
|
||||||
self.accelerate_port = C.ACCELERATE_PORT
|
self.accelerate_port = C.ACCELERATE_PORT
|
||||||
|
|
||||||
if actual_transport in [ 'paramiko', 'paramiko_alt', 'ssh', 'ssh_old', 'accelerate' ]:
|
if actual_transport in [ 'paramiko', 'ssh', 'accelerate' ]:
|
||||||
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
|
||||||
@@ -1007,7 +1007,7 @@ class Runner(object):
|
|||||||
if result['rc'] != 0:
|
if result['rc'] != 0:
|
||||||
if result['rc'] == 5:
|
if result['rc'] == 5:
|
||||||
output = 'Authentication failure.'
|
output = 'Authentication failure.'
|
||||||
elif result['rc'] == 255 and self.transport in ['ssh', 'ssh_old']:
|
elif result['rc'] == 255 and self.transport in ['ssh']:
|
||||||
if utils.VERBOSITY > 3:
|
if utils.VERBOSITY > 3:
|
||||||
output = 'SSH encountered an unknown error. The output was:\n%s' % (result['stdout']+result['stderr'])
|
output = 'SSH encountered an unknown error. The output was:\n%s' % (result['stdout']+result['stderr'])
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user