From 4e7d766e8f346a882a9ffb18faf01b8869cc7977 Mon Sep 17 00:00:00 2001 From: Ash Wilson Date: Mon, 9 Mar 2015 11:20:14 -0400 Subject: [PATCH] Include bind mounts in VOLUMES check. --- lib/ansible/modules/cloud/docker/docker.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/ansible/modules/cloud/docker/docker.py b/lib/ansible/modules/cloud/docker/docker.py index 1f00d21c31e..6189ffdd518 100644 --- a/lib/ansible/modules/cloud/docker/docker.py +++ b/lib/ansible/modules/cloud/docker/docker.py @@ -820,13 +820,11 @@ class DockerManager(object): continue # VOLUMES - # not including bind modes. expected_volume_keys = set((image['ContainerConfig']['Volumes'] or {}).keys()) if self.volumes: - for key, config in self.volumes.iteritems(): - if not config and key not in self.binds: - expected_volume_keys.add(key) + expected_volume_keys.update(self.volumes.keys()) + actual_volume_keys = set((container['Config']['Volumes'] or {}).keys()) if actual_volume_keys != expected_volume_keys: