moved module checking below module initialization

reviewable/pr18780/r1
Romeo Theriault 12 years ago committed by Michael DeHaan
parent 8b458b2921
commit 0e15b95787

9
uri

@ -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']

Loading…
Cancel
Save