Merge branch 'orgoj-docker_image-patch-notag' into devel

This commit is contained in:
James Cammarata 2014-05-08 21:05:19 -05:00
commit 5c18af1afa

View file

@ -45,7 +45,7 @@ options:
description:
- Image tag to work with
required: false
default: ""
default: "latest"
aliases: []
nocache:
description:
@ -164,7 +164,7 @@ class DockerImageManager:
for i in images:
# Docker-py version >= 0.3 (Docker API >= 1.8)
if 'RepoTags' in i:
repotag = '%s:%s' % (getattr(self, 'name', ''), getattr(self, 'tag', 'latest'))
repotag = ':'.join([self.name, self.tag])
if not self.name or repotag in i['RepoTags']:
filtered_images.append(i)
# Docker-py version < 0.3 (Docker API < 1.8)
@ -188,7 +188,7 @@ def main():
argument_spec = dict(
path = dict(required=False, default=None),
name = dict(required=True),
tag = dict(required=False, default=""),
tag = dict(required=False, default="latest"),
nocache = dict(default=False, type='bool'),
state = dict(default='present', choices=['absent', 'present', 'build']),
docker_url = dict(default='unix://var/run/docker.sock'),