mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Don't close persistent connection socket on command timeout (#43071)
* Don't close persistent connection socket on command timeout * handle exception in client of ansible-connection instead removing socket removal
This commit is contained in:
@@ -122,7 +122,11 @@ def to_commands(module, commands):
|
||||
|
||||
def run_commands(module, commands, check_rc=True):
|
||||
connection = get_connection(module)
|
||||
return connection.run_commands(commands=commands, check_rc=check_rc)
|
||||
try:
|
||||
out = connection.run_commands(commands=commands, check_rc=check_rc)
|
||||
return out
|
||||
except ConnectionError as exc:
|
||||
module.fail_json(msg=to_text(exc))
|
||||
|
||||
|
||||
def load_config(module, commands):
|
||||
|
||||
Reference in New Issue
Block a user