mirror of
https://github.com/ansible-collections/community.docker.git
synced 2025-12-15 19:42:06 +00:00
Implement connection reset. (#312)
This commit is contained in:
parent
b353a39ada
commit
3c7c496e67
3
changelogs/fragments/312-docker-connection-reset.yml
Normal file
3
changelogs/fragments/312-docker-connection-reset.yml
Normal 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)."
|
||||
@ -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 = {}
|
||||
|
||||
@ -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()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user