From 576d94e8d4fa8e79216441efd65be62cfb0c603f 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 --- monitoring/zabbix_screen.py | 6 ++++-- network/f5/bigip_facts.py | 6 ++++-- packaging/os/homebrew.py | 7 +++++-- packaging/os/homebrew_cask.py | 7 +++++-- packaging/os/homebrew_tap.py | 6 ++++-- 5 files changed, 22 insertions(+), 10 deletions(-) diff --git a/monitoring/zabbix_screen.py b/monitoring/zabbix_screen.py index 932681617f5..5ada0447571 100644 --- a/monitoring/zabbix_screen.py +++ b/monitoring/zabbix_screen.py @@ -415,5 +415,7 @@ def main(): else: module.exit_json(changed=False) -# <> -main() +from ansible.module_utils.basic import * + +if __name__ == '__main__': + main() diff --git a/network/f5/bigip_facts.py b/network/f5/bigip_facts.py index 4522d61bbad..7b78c6d97f7 100755 --- a/network/f5/bigip_facts.py +++ b/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/packaging/os/homebrew.py b/packaging/os/homebrew.py index f6d63b17d3c..b519efa071f 100644 --- a/packaging/os/homebrew.py +++ b/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/packaging/os/homebrew_cask.py b/packaging/os/homebrew_cask.py index 292da6c7f59..bb5cacabbc7 100644 --- a/packaging/os/homebrew_cask.py +++ b/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/packaging/os/homebrew_tap.py b/packaging/os/homebrew_tap.py index 1e0b6b66169..504e77eb062 100644 --- a/packaging/os/homebrew_tap.py +++ b/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()