mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
parent
8d6ed6e613
commit
9fb6cabe21
1 changed files with 3 additions and 3 deletions
|
@ -507,12 +507,12 @@ 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
|
||||||
resource = image.rsplit('/', 1)[-1]
|
registry, resource = image.rsplit('/', 1)
|
||||||
|
|
||||||
# now we can determine if image has a tag
|
# now we can determine if image has a tag
|
||||||
if resource.find(':') > 0:
|
if resource.find(':') > 0:
|
||||||
# Use image here so that host and org name are included
|
resource, tag = resource.split(':', 1)
|
||||||
return image.split(':', 1)
|
return '/'.join((registry, resource)), tag
|
||||||
else:
|
else:
|
||||||
tag = "latest"
|
tag = "latest"
|
||||||
return image, tag
|
return image, tag
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue