mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 03:00:23 -07:00
My fix was wrong again. Base this try off of @mantiz's fix in #9016
This commit is contained in:
parent
733290a731
commit
9f70830569
1 changed files with 8 additions and 5 deletions
|
@ -507,18 +507,21 @@ class DockerManager:
|
||||||
|
|
||||||
def get_split_image_tag(self, image):
|
def get_split_image_tag(self, image):
|
||||||
# If image contains a host or org name, omit that from our check
|
# If image contains a host or org name, omit that from our check
|
||||||
if image.find('/') > 0:
|
if '/' in image:
|
||||||
registry, resource = image.rsplit('/', 1)
|
registry, resource = image.rsplit('/', 1)
|
||||||
else:
|
else:
|
||||||
registry, resource = '', image
|
registry, resource = None, image
|
||||||
|
|
||||||
# now we can determine if image has a tag
|
# now we can determine if image has a tag
|
||||||
if resource.find(':') > 0:
|
if ':' in resource:
|
||||||
resource, tag = resource.split(':', 1)
|
resource, tag = resource.split(':', 1)
|
||||||
return '/'.join((registry, resource)), tag
|
if registry:
|
||||||
|
resource = '/'.join((registry, resource))
|
||||||
else:
|
else:
|
||||||
tag = "latest"
|
tag = "latest"
|
||||||
return image, tag
|
resource = image
|
||||||
|
|
||||||
|
return resource, tag
|
||||||
|
|
||||||
def get_summary_counters_msg(self):
|
def get_summary_counters_msg(self):
|
||||||
msg = ""
|
msg = ""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue