mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07: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:
parent
4dd8f281d6
commit
70ce394840
23 changed files with 154 additions and 73 deletions
|
@ -20,6 +20,7 @@ __metaclass__ = type
|
|||
import sys
|
||||
import copy
|
||||
|
||||
from ansible import constants as C
|
||||
from ansible.plugins.action import ActionBase
|
||||
from ansible.module_utils.basic import AnsibleFallbackNotFound
|
||||
from ansible.module_utils.six import iteritems
|
||||
|
@ -59,7 +60,7 @@ class ActionModule(ActionBase):
|
|||
play_context.remote_user = self.provider['username'] or self._play_context.connection_user
|
||||
play_context.password = self.provider['password'] or self._play_context.password
|
||||
play_context.private_key_file = self.provider['ssh_keyfile'] or self._play_context.private_key_file
|
||||
play_context.timeout = self.provider['timeout'] or self._play_context.timeout
|
||||
play_context.timeout = self.provider['timeout'] or C.PERSISTENT_COMMAND_TIMEOUT
|
||||
if 'authorize' in self.provider.keys():
|
||||
play_context.become = self.provider['authorize'] or False
|
||||
play_context.become_pass = self.provider['auth_pass']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue