mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 22:00:22 -07:00
Removing accelerate_timeout as a playbook option
This will remain in ansible.cfg only.
This commit is contained in:
parent
d317103371
commit
8c17711247
4 changed files with 3 additions and 15 deletions
|
@ -136,7 +136,6 @@ class Runner(object):
|
|||
error_on_undefined_vars=C.DEFAULT_UNDEFINED_VAR_BEHAVIOR, # ex. False
|
||||
accelerate=False, # use accelerated connection
|
||||
accelerate_port=None, # port to use with accelerated connection
|
||||
accelerate_timeout=None, # number of seconds to wait for a response on the accelerated connection
|
||||
):
|
||||
|
||||
# used to lock multiprocess inputs and outputs at various levels
|
||||
|
@ -180,7 +179,6 @@ class Runner(object):
|
|||
self.error_on_undefined_vars = error_on_undefined_vars
|
||||
self.accelerate = accelerate
|
||||
self.accelerate_port = accelerate_port
|
||||
self.accelerate_timeout = accelerate_timeout
|
||||
self.callbacks.runner = self
|
||||
self.original_transport = self.transport
|
||||
|
||||
|
@ -583,12 +581,6 @@ class Runner(object):
|
|||
actual_transport = "accelerate"
|
||||
if not self.accelerate_port:
|
||||
self.accelerate_port = C.ACCELERATE_PORT
|
||||
try:
|
||||
if not self.accelerate_timeout:
|
||||
self.accelerate_timeout = C.ACCELERATE_TIMEOUT
|
||||
self.accelerate_timeout = int(self.accelerate_timeout)
|
||||
except:
|
||||
raise errors.AnsibleError("invalid value for the accelerate_timeout parameter")
|
||||
|
||||
if actual_transport in [ 'paramiko', 'ssh', 'accelerate' ]:
|
||||
actual_port = inject.get('ansible_ssh_port', port)
|
||||
|
|
|
@ -100,7 +100,6 @@ class Connection(object):
|
|||
|
||||
try:
|
||||
if not self.is_connected:
|
||||
# TODO: make the timeout and retries configurable?
|
||||
tries = 3
|
||||
self.conn = socket.socket()
|
||||
self.conn.settimeout(constants.ACCELERATE_CONNECT_TIMEOUT)
|
||||
|
@ -116,7 +115,7 @@ class Connection(object):
|
|||
if tries == 0:
|
||||
vvv("Could not connect via the accelerated connection, exceeded # of tries")
|
||||
raise errors.AnsibleError("Failed to connect")
|
||||
self.conn.settimeout(self.runner.accelerate_timeout)
|
||||
self.conn.settimeout(constants.ACCELERATE_TIMEOUT)
|
||||
except:
|
||||
if allow_ssh:
|
||||
vvv("Falling back to ssh to startup accelerated mode")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue