Implement connection reset. (#312)

This commit is contained in:
Felix Fontein 2022-03-22 07:13:39 +01:00 committed by GitHub
parent b353a39ada
commit 3c7c496e67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,3 @@
minor_changes:
- "docker connection plugin - implement connection reset by clearing internal container user cache (https://github.com/ansible-collections/community.docker/pull/312)."
- "docker_api connection plugin - implement connection reset by clearing internal container user/group ID cache (https://github.com/ansible-collections/community.docker/pull/312)."

View File

@ -435,3 +435,7 @@ class Connection(ConnectionBase):
""" Terminate the connection. Nothing to do for Docker"""
super(Connection, self).close()
self._connected = False
def reset(self):
# Clear container user cache
self._container_user_cache = {}

View File

@ -383,3 +383,6 @@ class Connection(ConnectionBase):
""" Terminate the connection. Nothing to do for Docker"""
super(Connection, self).close()
self._connected = False
def reset(self):
self.ids.clear()