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
2ecf3f9b
Commit
2ecf3f9b
authored
Feb 15, 2013
by
Romeo Theriault
Committed by
Michael DeHaan
Feb 16, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved module checking below module initialization
parent
27145fab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
library/uri
+5
-4
No files found.
library/uri
View file @
2ecf3f9b
...
...
@@ -256,10 +256,6 @@ def uri(module, url, dest, user, password, body, method, headers, redirects):
module
.
fail_json
(
msg
=
"Socket error:
%
s to
%
s"
%
(
e
,
url
))
def
main
():
if
not
HAS_HTTPLIB2
:
module
.
fail_json
(
msg
=
"httplib2 is not installed"
)
if
not
HAS_URLPARSE
:
module
.
fail_json
(
msg
=
"urlparse is not installed"
)
module
=
AnsibleModule
(
argument_spec
=
dict
(
...
...
@@ -280,6 +276,11 @@ def main():
add_file_common_args
=
True
)
if
not
HAS_HTTPLIB2
:
module
.
fail_json
(
msg
=
"httplib2 is not installed"
)
if
not
HAS_URLPARSE
:
module
.
fail_json
(
msg
=
"urlparse is not installed"
)
url
=
module
.
params
[
'url'
]
user
=
module
.
params
[
'user'
]
password
=
module
.
params
[
'password'
]
...
...
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