mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
Revert "remove closing connections after every task, this goes against conneciton caching and was not expected behaviuor nor inhertited from v1"
needed for winrm, disabled closing connections in ssh to avoid issues with that persistance, need to normalize all this in future
This reverts commit 23a22397bf
.
This commit is contained in:
parent
3f0e14c2a0
commit
0dbebfddaa
1 changed files with 7 additions and 0 deletions
|
@ -129,6 +129,13 @@ class TaskExecutor:
|
|||
return result
|
||||
except AnsibleError as e:
|
||||
return dict(failed=True, msg=to_unicode(e, nonstring='simplerepr'))
|
||||
finally:
|
||||
try:
|
||||
self._connection.close()
|
||||
except AttributeError:
|
||||
pass
|
||||
except Exception as e:
|
||||
debug("error closing connection: %s" % to_unicode(e))
|
||||
|
||||
def _get_loop_items(self):
|
||||
'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue