Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
1c3039f0
Commit
1c3039f0
authored
Sep 11, 2014
by
Toshio Kuratomi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Omit tag from parsed image name
Fixes #8925
parent
503f7afb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
library/cloud/docker
+9
-6
No files found.
library/cloud/docker
View file @
1c3039f0
...
@@ -506,12 +506,15 @@ class DockerManager:
...
@@ -506,12 +506,15 @@ class DockerManager:
def
get_split_image_tag
(
self
,
image
):
def
get_split_image_tag
(
self
,
image
):
if
'/'
in
image
:
# If image contains a host or org name, omit that from our check
image
=
image
.
split
(
'/'
)[
-
1
]
resource
=
image
.
rsplit
(
'/'
,
1
)[
-
1
]
tag
=
"latest"
if
image
.
find
(
':'
)
>
0
:
# now we can determine if image has a tag
return
image
.
split
(
':'
)
if
resource
.
find
(
':'
)
>
0
:
# Use image here so that host and org name are included
return
image
.
split
(
':'
,
1
)
else
:
else
:
tag
=
"latest"
return
image
,
tag
return
image
,
tag
def
get_summary_counters_msg
(
self
):
def
get_summary_counters_msg
(
self
):
...
@@ -626,7 +629,7 @@ class DockerManager:
...
@@ -626,7 +629,7 @@ class DockerManager:
except
:
except
:
self
.
module
.
fail_json
(
msg
=
"failed to login to the remote registry, check your username/password."
)
self
.
module
.
fail_json
(
msg
=
"failed to login to the remote registry, check your username/password."
)
try
:
try
:
self
.
client
.
pull
(
resourc
e
,
tag
=
tag
)
self
.
client
.
pull
(
imag
e
,
tag
=
tag
)
except
:
except
:
self
.
module
.
fail_json
(
msg
=
"failed to pull the specified image:
%
s"
%
resource
)
self
.
module
.
fail_json
(
msg
=
"failed to pull the specified image:
%
s"
%
resource
)
self
.
increment_counter
(
'pull'
)
self
.
increment_counter
(
'pull'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment