diff --git a/lib/ansible/modules/cloud/docker/docker_network.py b/lib/ansible/modules/cloud/docker/docker_network.py index f5d37a503c5..3c0f581ba12 100644 --- a/lib/ansible/modules/cloud/docker/docker_network.py +++ b/lib/ansible/modules/cloud/docker/docker_network.py @@ -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