mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-04 04:12:48 +00:00
Check for an existing docker_network before trying to modify it (#24048)
This eliminates a TypeError in check mode.
This commit is contained in:
committed by
ansibot
parent
b1df75fc1c
commit
be2d4cc1c9
@@ -308,6 +308,8 @@ class DockerNetworkManager(object):
|
||||
self.results['changed'] = True
|
||||
|
||||
def disconnect_missing(self):
|
||||
if not self.existing_network:
|
||||
return
|
||||
containers = self.existing_network['Containers']
|
||||
if not containers:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user