Use explicit import
authorLorin Hochstein <lhochstein@netflix.com>
Wed, 11 Jan 2017 07:04:44 +0000 (23:04 -0800)
committerLorin Hochstein <lhochstein@netflix.com>
Wed, 11 Jan 2017 07:04:44 +0000 (23:04 -0800)
ch10/playbooks/library/can_reach

index 3c78849..1b1ff9f 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/python
+from ansible.module_utils.basic import AnsibleModule
 
 def can_reach(module, host, port, timeout):
     nc_path = module.get_bin_path('nc', required=True)
@@ -33,5 +34,4 @@ def main():
         msg = "Could not reach %s:%s" % (host, port)
         module.fail_json(msg=msg)
 
-from ansible.module_utils.basic import *
 main()