diff --git a/lib/ansible/modules/cloud/docker/docker_container.py b/lib/ansible/modules/cloud/docker/docker_container.py index 30808a1bbe..51e9d8c04a 100644 --- a/lib/ansible/modules/cloud/docker/docker_container.py +++ b/lib/ansible/modules/cloud/docker/docker_container.py @@ -1311,7 +1311,7 @@ class Container(DockerBaseClass): self.log("comparing lists: %s" % key) set_a = set(getattr(self.parameters, key)) set_b = set(value) - match = (set_a <= set_b) + match = (set_a == set_b) elif isinstance(getattr(self.parameters, key), list) and not len(getattr(self.parameters, key)) \ and value is None: # an empty list and None are ==