From 16a3f28f6efa7ac3ab59970863bcc12434585350 Mon Sep 17 00:00:00 2001
From: Chris Houseknecht <chousekn@redhat.com>
Date: Mon, 11 Jul 2016 17:10:57 -0400
Subject: [PATCH] Fix find_image() not matching on tag

---
 lib/ansible/module_utils/docker_common.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/ansible/module_utils/docker_common.py b/lib/ansible/module_utils/docker_common.py
index 508bf123470..e5651bac4a7 100644
--- a/lib/ansible/module_utils/docker_common.py
+++ b/lib/ansible/module_utils/docker_common.py
@@ -431,9 +431,10 @@ class AnsibleDockerClient(Client):
         images = response
         if tag: 
             lookup = "%s:%s" % (name, tag)
+            images = []
             for image in response:
-                self.log(image, pretty_print=True)
-                if image.get('RepoTags') and lookup in image.get('RepoTags'):
+                tags = image.get('RepoTags')
+                if tags and lookup in tags:
                     images = [image]
                     break
         return images