Check for an existing docker_network before trying to modify it (#24048)
This eliminates a TypeError in check mode.
This commit is contained in:
parent
b1df75fc1c
commit
be2d4cc1c9
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue