diff options
author | Fabio Alessandro Locati <me@fale.io> | 2016-12-05 17:20:51 +0100 |
---|---|---|
committer | Matt Clay <matt@mystile.com> | 2016-12-08 17:35:15 +0100 |
commit | afa6fa9a891673b889cbab68552db3fd8c3812dc (patch) | |
tree | decd694b9be8f3cad680a0748a51ea17f5e6bb2e /lib | |
parent | Make `main()` calls conditional - files (#3658) (diff) | |
download | ansible-afa6fa9a891673b889cbab68552db3fd8c3812dc.tar.xz ansible-afa6fa9a891673b889cbab68552db3fd8c3812dc.zip |
Make `main()` calls conditional - cloud (#3657)
Diffstat (limited to 'lib')
21 files changed, 47 insertions, 21 deletions
diff --git a/lib/ansible/modules/extras/cloud/amazon/ec2_win_password.py b/lib/ansible/modules/extras/cloud/amazon/ec2_win_password.py index df5250ba81..e4245e1f11 100644 --- a/lib/ansible/modules/extras/cloud/amazon/ec2_win_password.py +++ b/lib/ansible/modules/extras/cloud/amazon/ec2_win_password.py @@ -176,4 +176,5 @@ def main(): from ansible.module_utils.basic import * from ansible.module_utils.ec2 import * -main() +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/cloud/misc/ovirt.py b/lib/ansible/modules/extras/cloud/misc/ovirt.py index 646d3cb3b6..9026c0c0e0 100644 --- a/lib/ansible/modules/extras/cloud/misc/ovirt.py +++ b/lib/ansible/modules/extras/cloud/misc/ovirt.py @@ -518,4 +518,6 @@ def main(): # import module snippets from ansible.module_utils.basic import * -main() + +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/cloud/misc/proxmox.py b/lib/ansible/modules/extras/cloud/misc/proxmox.py index 694d79e926..db0233c22f 100644 --- a/lib/ansible/modules/extras/cloud/misc/proxmox.py +++ b/lib/ansible/modules/extras/cloud/misc/proxmox.py @@ -553,4 +553,6 @@ def main(): # import module snippets from ansible.module_utils.basic import * -main() + +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/cloud/misc/proxmox_template.py b/lib/ansible/modules/extras/cloud/misc/proxmox_template.py index 69a2272408..70cd445a18 100644 --- a/lib/ansible/modules/extras/cloud/misc/proxmox_template.py +++ b/lib/ansible/modules/extras/cloud/misc/proxmox_template.py @@ -252,4 +252,6 @@ def main(): # import module snippets from ansible.module_utils.basic import * -main() + +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/cloud/misc/virt.py b/lib/ansible/modules/extras/cloud/misc/virt.py index 8c1e2969ac..468cd2c5fb 100644 --- a/lib/ansible/modules/extras/cloud/misc/virt.py +++ b/lib/ansible/modules/extras/cloud/misc/virt.py @@ -529,4 +529,6 @@ def main(): # import module snippets from ansible.module_utils.basic import * from ansible.module_utils.pycompat24 import get_exception -main() + +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/cloud/profitbricks/profitbricks_datacenter.py b/lib/ansible/modules/extras/cloud/profitbricks/profitbricks_datacenter.py index 0b21d3e4cd..de64f1c210 100644 --- a/lib/ansible/modules/extras/cloud/profitbricks/profitbricks_datacenter.py +++ b/lib/ansible/modules/extras/cloud/profitbricks/profitbricks_datacenter.py @@ -255,4 +255,5 @@ def main(): from ansible.module_utils.basic import * -main() +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/cloud/profitbricks/profitbricks_nic.py b/lib/ansible/modules/extras/cloud/profitbricks/profitbricks_nic.py index 902d526684..8835e1175a 100644 --- a/lib/ansible/modules/extras/cloud/profitbricks/profitbricks_nic.py +++ b/lib/ansible/modules/extras/cloud/profitbricks/profitbricks_nic.py @@ -287,4 +287,5 @@ def main(): from ansible.module_utils.basic import * -main()
\ No newline at end of file +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/cloud/profitbricks/profitbricks_volume_attachments.py b/lib/ansible/modules/extras/cloud/profitbricks/profitbricks_volume_attachments.py index fe87594fdd..ac4db01364 100644 --- a/lib/ansible/modules/extras/cloud/profitbricks/profitbricks_volume_attachments.py +++ b/lib/ansible/modules/extras/cloud/profitbricks/profitbricks_volume_attachments.py @@ -259,4 +259,5 @@ def main(): from ansible.module_utils.basic import * -main()
\ No newline at end of file +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/cloud/rackspace/rax_clb_ssl.py b/lib/ansible/modules/extras/cloud/rackspace/rax_clb_ssl.py index 9077305816..57b2135411 100644 --- a/lib/ansible/modules/extras/cloud/rackspace/rax_clb_ssl.py +++ b/lib/ansible/modules/extras/cloud/rackspace/rax_clb_ssl.py @@ -266,4 +266,5 @@ def main(): from ansible.module_utils.basic import * from ansible.module_utils.rax import * -main() +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/cloud/rackspace/rax_mon_alarm.py b/lib/ansible/modules/extras/cloud/rackspace/rax_mon_alarm.py index a3f29e22f5..2a7a3d8db6 100644 --- a/lib/ansible/modules/extras/cloud/rackspace/rax_mon_alarm.py +++ b/lib/ansible/modules/extras/cloud/rackspace/rax_mon_alarm.py @@ -224,4 +224,5 @@ from ansible.module_utils.basic import * from ansible.module_utils.rax import * # Invoke the module. -main() +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/cloud/rackspace/rax_mon_check.py b/lib/ansible/modules/extras/cloud/rackspace/rax_mon_check.py index 14b86864e2..6cc5eade34 100644 --- a/lib/ansible/modules/extras/cloud/rackspace/rax_mon_check.py +++ b/lib/ansible/modules/extras/cloud/rackspace/rax_mon_check.py @@ -310,4 +310,5 @@ from ansible.module_utils.basic import * from ansible.module_utils.rax import * # Invoke the module. -main() +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/cloud/rackspace/rax_mon_entity.py b/lib/ansible/modules/extras/cloud/rackspace/rax_mon_entity.py index f5f142d216..bc41e1fef0 100644 --- a/lib/ansible/modules/extras/cloud/rackspace/rax_mon_entity.py +++ b/lib/ansible/modules/extras/cloud/rackspace/rax_mon_entity.py @@ -189,4 +189,5 @@ from ansible.module_utils.basic import * from ansible.module_utils.rax import * # Invoke the module. -main() +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/cloud/rackspace/rax_mon_notification.py b/lib/ansible/modules/extras/cloud/rackspace/rax_mon_notification.py index d7b6692dc2..092b1826b8 100644 --- a/lib/ansible/modules/extras/cloud/rackspace/rax_mon_notification.py +++ b/lib/ansible/modules/extras/cloud/rackspace/rax_mon_notification.py @@ -173,4 +173,5 @@ from ansible.module_utils.basic import * from ansible.module_utils.rax import * # Invoke the module. -main() +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/cloud/rackspace/rax_mon_notification_plan.py b/lib/ansible/modules/extras/cloud/rackspace/rax_mon_notification_plan.py index 5bb3fa1652..41a15bca23 100644 --- a/lib/ansible/modules/extras/cloud/rackspace/rax_mon_notification_plan.py +++ b/lib/ansible/modules/extras/cloud/rackspace/rax_mon_notification_plan.py @@ -178,4 +178,5 @@ from ansible.module_utils.basic import * from ansible.module_utils.rax import * # Invoke the module. -main() +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/cloud/smartos/smartos_image_facts.py b/lib/ansible/modules/extras/cloud/smartos/smartos_image_facts.py index eb3ecd08a3..6a16e2e965 100644 --- a/lib/ansible/modules/extras/cloud/smartos/smartos_image_facts.py +++ b/lib/ansible/modules/extras/cloud/smartos/smartos_image_facts.py @@ -114,4 +114,6 @@ def main(): module.exit_json(ansible_facts=data) from ansible.module_utils.basic import * -main() + +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/cloud/webfaction/webfaction_app.py b/lib/ansible/modules/extras/cloud/webfaction/webfaction_app.py index 8f40a9ab85..77cb6f1755 100644 --- a/lib/ansible/modules/extras/cloud/webfaction/webfaction_app.py +++ b/lib/ansible/modules/extras/cloud/webfaction/webfaction_app.py @@ -195,5 +195,6 @@ def main(): ) from ansible.module_utils.basic import * -main() +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/cloud/webfaction/webfaction_db.py b/lib/ansible/modules/extras/cloud/webfaction/webfaction_db.py index 6c45e700e9..8f3d77c3df 100644 --- a/lib/ansible/modules/extras/cloud/webfaction/webfaction_db.py +++ b/lib/ansible/modules/extras/cloud/webfaction/webfaction_db.py @@ -196,5 +196,6 @@ def main(): ) from ansible.module_utils.basic import * -main() +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/cloud/webfaction/webfaction_domain.py b/lib/ansible/modules/extras/cloud/webfaction/webfaction_domain.py index c809dd6beb..d89add88cb 100644 --- a/lib/ansible/modules/extras/cloud/webfaction/webfaction_domain.py +++ b/lib/ansible/modules/extras/cloud/webfaction/webfaction_domain.py @@ -167,5 +167,6 @@ def main(): ) from ansible.module_utils.basic import * -main() +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/cloud/webfaction/webfaction_mailbox.py b/lib/ansible/modules/extras/cloud/webfaction/webfaction_mailbox.py index bcb355c963..08008d7d5c 100644 --- a/lib/ansible/modules/extras/cloud/webfaction/webfaction_mailbox.py +++ b/lib/ansible/modules/extras/cloud/webfaction/webfaction_mailbox.py @@ -135,5 +135,6 @@ def main(): from ansible.module_utils.basic import * -main() +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/cloud/webfaction/webfaction_site.py b/lib/ansible/modules/extras/cloud/webfaction/webfaction_site.py index bd5504b6b4..46f440b6a0 100644 --- a/lib/ansible/modules/extras/cloud/webfaction/webfaction_site.py +++ b/lib/ansible/modules/extras/cloud/webfaction/webfaction_site.py @@ -206,5 +206,6 @@ def main(): from ansible.module_utils.basic import * -main() +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/cloud/xenserver_facts.py b/lib/ansible/modules/extras/cloud/xenserver_facts.py index 04c88d3431..1ca8e9e6c8 100644 --- a/lib/ansible/modules/extras/cloud/xenserver_facts.py +++ b/lib/ansible/modules/extras/cloud/xenserver_facts.py @@ -201,4 +201,5 @@ def main(): from ansible.module_utils.basic import * -main() +if __name__ == '__main__': + main() |