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
9c3fb9c2
Commit
9c3fb9c2
authored
Oct 09, 2013
by
James Tanner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
4006: return s3 url even if file exists
parent
948d019f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
library/cloud/s3
+3
-3
No files found.
library/cloud/s3
View file @
9c3fb9c2
...
...
@@ -231,12 +231,12 @@ def download_s3str(module, s3, bucket, obj):
except
s3
.
provider
.
storage_copy_error
,
e
:
module
.
fail_json
(
msg
=
str
(
e
))
def
get_download_url
(
module
,
s3
,
bucket
,
obj
,
expiry
):
def
get_download_url
(
module
,
s3
,
bucket
,
obj
,
expiry
,
changed
=
True
):
try
:
bucket
=
s3
.
lookup
(
bucket
)
key
=
bucket
.
lookup
(
obj
)
url
=
key
.
generate_url
(
expiry
)
module
.
exit_json
(
msg
=
"Download url:"
,
url
=
url
,
expiry
=
expiry
,
changed
=
True
)
module
.
exit_json
(
msg
=
"Download url:"
,
url
=
url
,
expiry
=
expiry
,
changed
=
changed
)
sys
.
exit
(
0
)
except
s3
.
provider
.
storage_response_error
,
e
:
module
.
fail_json
(
msg
=
str
(
e
))
...
...
@@ -378,7 +378,7 @@ def main():
if
overwrite
is
True
:
upload_s3file
(
module
,
s3
,
bucket
,
obj
,
src
,
expiry
)
else
:
module
.
exit_json
(
msg
=
"Local and remote object are identical, ignoring. Use overwrite parameter to force."
,
changed
=
False
)
get_download_url
(
module
,
s3
,
bucket
,
obj
,
expiry
,
changed
=
False
)
## PATCH
else
:
sum_matches
=
False
if
overwrite
is
True
:
...
...
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