mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Persistent connection timer changes (#27272)
* Add command_timeout timer that defines the amount of time to wait for a command or RPC call before timing out. * Remove connect_retries and connect_interval configuration varaible and replace it with connect_retry_timeout to control the timeout value of connection to local scoket. * Make required changes to netowrk action plugins and relevant network files in module_utils. * Required documentation changes.
This commit is contained in:
committed by
Chris Alfonso
parent
4dd8f281d6
commit
70ce394840
@@ -22,6 +22,7 @@ __metaclass__ = type
|
||||
import sys
|
||||
import copy
|
||||
|
||||
from ansible import constants as C
|
||||
from ansible.plugins.action.normal import ActionModule as _ActionModule
|
||||
from ansible.module_utils.six import iteritems
|
||||
from ansible.module_utils.ce import ce_argument_spec
|
||||
@@ -57,7 +58,7 @@ class ActionModule(_ActionModule):
|
||||
pc.port = int(provider['port']) or int(self._play_context.port) or 22
|
||||
pc.remote_user = provider['username'] or self._play_context.connection_user
|
||||
pc.password = provider['password'] or self._play_context.password
|
||||
pc.timeout = provider['timeout'] or self._play_context.timeout
|
||||
pc.timeout = provider['timeout'] or C.PERSISTENT_COMMAND_TIMEOUT
|
||||
self._task.args['provider'] = provider.update(
|
||||
host=pc.remote_addr,
|
||||
port=pc.port,
|
||||
|
||||
Reference in New Issue
Block a user