From 7e5a4afb6bdefab45fd7b22631a6d1ea98af160c Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Mon, 18 May 2015 11:59:20 -0700 Subject: [PATCH] Update module "imports" to new style Fixes #1351 --- lib/ansible/modules/cloud/amazon/_ec2_ami_search.py | 2 +- lib/ansible/modules/cloud/vmware/vsphere_guest.py | 2 +- lib/ansible/modules/files/replace.py | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/ansible/modules/cloud/amazon/_ec2_ami_search.py b/lib/ansible/modules/cloud/amazon/_ec2_ami_search.py index 6296020b777..65953af2b5d 100644 --- a/lib/ansible/modules/cloud/amazon/_ec2_ami_search.py +++ b/lib/ansible/modules/cloud/amazon/_ec2_ami_search.py @@ -195,7 +195,7 @@ def main(): # this is magic, see lib/ansible/module_common.py -#<> +from ansible.module_utils.basic import * if __name__ == '__main__': main() diff --git a/lib/ansible/modules/cloud/vmware/vsphere_guest.py b/lib/ansible/modules/cloud/vmware/vsphere_guest.py index 248904676f6..330f2c7a6aa 100644 --- a/lib/ansible/modules/cloud/vmware/vsphere_guest.py +++ b/lib/ansible/modules/cloud/vmware/vsphere_guest.py @@ -1321,6 +1321,6 @@ def main(): # this is magic, see lib/ansible/module_common.py -#<> +from ansible.module_utils.basic import * if __name__ == '__main__': main() diff --git a/lib/ansible/modules/files/replace.py b/lib/ansible/modules/files/replace.py index 588af02391e..a21d84cd8df 100644 --- a/lib/ansible/modules/files/replace.py +++ b/lib/ansible/modules/files/replace.py @@ -160,6 +160,7 @@ def main(): module.exit_json(changed=changed, msg=msg) # this is magic, see lib/ansible/module_common.py -#<> +from ansible.module_utils.basic import * -main() +if __name__ == '__main__': + main()