diff --git a/lib/ansible/modules/extras/cloud/ovh/ovh_ip_loadbalancing_backend.py b/lib/ansible/modules/extras/cloud/ovh/ovh_ip_loadbalancing_backend.py index f982a17a2c..59fc2c608b 100644 --- a/lib/ansible/modules/extras/cloud/ovh/ovh_ip_loadbalancing_backend.py +++ b/lib/ansible/modules/extras/cloud/ovh/ovh_ip_loadbalancing_backend.py @@ -13,18 +13,6 @@ # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . -import sys -try: - import ovh - import ovh.exceptions - from ovh.exceptions import APIError - HAS_OVH = True -except ImportError: - HAS_OVH = False - -# import module snippets -from ansible.module_utils.basic import * - DOCUMENTATION = ''' --- module: ovh_ip_loadbalancing_backend @@ -108,6 +96,15 @@ application_secret=yoursecret consumer_key=yourconsumerkey RETURN = ''' ''' +import sys +try: + import ovh + import ovh.exceptions + from ovh.exceptions import APIError + HAS_OVH = True +except ImportError: + HAS_OVH = False + def getOvhClient(ansibleModule): endpoint = ansibleModule.params.get('endpoint') application_key = ansibleModule.params.get('application_key') @@ -296,5 +293,8 @@ def main(): # We should never reach here module.fail_json(msg='Internal ovh_ip_loadbalancing_backend module error') +# import module snippets +from ansible.module_utils.basic import * + if __name__ == '__main__': main()