1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix find_image() not matching on tag

This commit is contained in:
Chris Houseknecht 2016-07-11 17:10:57 -04:00
parent de549ad675
commit 16a3f28f6e

View file

@ -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