From 82436d55198b2b56e5314ac2091088fa449f54b7 Mon Sep 17 00:00:00 2001 From: chouseknecht Date: Mon, 13 Jun 2016 13:38:22 -0400 Subject: [PATCH] Fix #3941 --- lib/ansible/modules/cloud/docker/docker_container.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ansible/modules/cloud/docker/docker_container.py b/lib/ansible/modules/cloud/docker/docker_container.py index e9afaa379c..2e60286425 100644 --- a/lib/ansible/modules/cloud/docker/docker_container.py +++ b/lib/ansible/modules/cloud/docker/docker_container.py @@ -1776,10 +1776,10 @@ class ContainerManager(DockerBaseClass): self.fail("Error starting container %s: %s" % (container_id, str(exc))) return self._get_container(container_id) - def container_remove(self, container_id, v=False, link=False, force=False): - volume_state = (True if self.parameters.keep_volumes else False) - self.log("remove container container:%s v:%s link:%s force%s" % (container_id, v, link, force)) - self.results['actions'].append(dict(removed=container_id, volume_state=volume_state)) + def container_remove(self, container_id, link=False, force=False): + volume_state = (not self.parameters.keep_volumes) + self.log("remove container container:%s v:%s link:%s force%s" % (container_id, volume_state, link, force)) + self.results['actions'].append(dict(removed=container_id, volume_state=volume_state, link=link, force=force)) self.results['changed'] = True response = None if not self.check_mode: