From efc63d9c40de32c375b2b2fb5a55e2ae1d394e3b Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Mon, 18 May 2015 12:08:15 -0700 Subject: [PATCH] Update module_utils "import" to the new-style Fixes #505 --- lib/ansible/modules/extras/monitoring/zabbix_screen.py | 6 ++++-- lib/ansible/modules/extras/network/f5/bigip_facts.py | 6 ++++-- lib/ansible/modules/extras/packaging/os/homebrew.py | 7 +++++-- lib/ansible/modules/extras/packaging/os/homebrew_cask.py | 7 +++++-- lib/ansible/modules/extras/packaging/os/homebrew_tap.py | 6 ++++-- 5 files changed, 22 insertions(+), 10 deletions(-) diff --git a/lib/ansible/modules/extras/monitoring/zabbix_screen.py b/lib/ansible/modules/extras/monitoring/zabbix_screen.py index b6fc77984e0..f1e117a18c7 100644 --- a/lib/ansible/modules/extras/monitoring/zabbix_screen.py +++ b/lib/ansible/modules/extras/monitoring/zabbix_screen.py @@ -412,5 +412,7 @@ def main(): else: module.exit_json(changed=False) -# <> -main() +from ansible.module_utils.basic import * + +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/network/f5/bigip_facts.py b/lib/ansible/modules/extras/network/f5/bigip_facts.py index e32ff9e5240..a36bc399bff 100755 --- a/lib/ansible/modules/extras/network/f5/bigip_facts.py +++ b/lib/ansible/modules/extras/network/f5/bigip_facts.py @@ -1684,6 +1684,8 @@ def main(): module.exit_json(**result) # include magic from lib/ansible/module_common.py -#<> -main() +from ansible.module_utils.basic import * + +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/packaging/os/homebrew.py b/lib/ansible/modules/extras/packaging/os/homebrew.py index f6d63b17d3c..b519efa071f 100644 --- a/lib/ansible/modules/extras/packaging/os/homebrew.py +++ b/lib/ansible/modules/extras/packaging/os/homebrew.py @@ -834,5 +834,8 @@ def main(): module.exit_json(changed=changed, msg=message) # this is magic, see lib/ansible/module_common.py -#<> -main() +from ansible.module_utils.basic import * + +if __name__ == '__main__': + main() + diff --git a/lib/ansible/modules/extras/packaging/os/homebrew_cask.py b/lib/ansible/modules/extras/packaging/os/homebrew_cask.py index 292da6c7f59..bb5cacabbc7 100644 --- a/lib/ansible/modules/extras/packaging/os/homebrew_cask.py +++ b/lib/ansible/modules/extras/packaging/os/homebrew_cask.py @@ -509,5 +509,8 @@ def main(): module.exit_json(changed=changed, msg=message) # this is magic, see lib/ansible/module_common.py -#<> -main() +from ansible.module_utils.basic import * + +if __name__ == '__main__': + main() + diff --git a/lib/ansible/modules/extras/packaging/os/homebrew_tap.py b/lib/ansible/modules/extras/packaging/os/homebrew_tap.py index 1e0b6b66169..504e77eb062 100644 --- a/lib/ansible/modules/extras/packaging/os/homebrew_tap.py +++ b/lib/ansible/modules/extras/packaging/os/homebrew_tap.py @@ -211,5 +211,7 @@ def main(): module.exit_json(changed=changed, msg=msg) # this is magic, see lib/ansible/module_common.py -#<> -main() +from ansible.module_utils.basic import * + +if __name__ == '__main__': + main()