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
70777f04
Commit
70777f04
authored
Sep 14, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1047 from lotia/get_url_require_thirsty_if_dest_is_dir
Make get_url module always return dest.
parents
4cffdbbc
c0aac03b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
library/get_url
+2
-3
No files found.
library/get_url
View file @
70777f04
...
...
@@ -145,11 +145,10 @@ def main():
thirsty
=
module
.
boolean
(
module
.
params
[
'thirsty'
])
if
not
thirsty
:
if
os
.
path
.
exists
(
dest
):
module
.
exit_json
(
msg
=
"file already exists"
,
changed
=
False
)
if
os
.
path
.
isdir
(
dest
):
module
.
fail_json
(
msg
=
"non-thirsty mode needs a filename for a destination, not a directory"
)
if
os
.
path
.
exists
(
dest
):
module
.
exit_json
(
msg
=
"file already exists"
,
dest
=
dest
,
url
=
url
,
changed
=
False
)
# download to tmpsrc
tmpsrc
,
info
=
url_get
(
module
,
url
,
dest
)
...
...
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