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 df5250ba819..e4245e1f11c 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 646d3cb3b66..9026c0c0e00 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 694d79e9267..db0233c22f5 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 69a2272408f..70cd445a185 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 8c1e2969ac2..468cd2c5fb6 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 0b21d3e4cd6..de64f1c210e 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 902d5266843..8835e1175ad 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 fe87594fddc..ac4db01364f 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 90773058165..57b21354110 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 a3f29e22f50..2a7a3d8db6b 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 14b86864e2f..6cc5eade348 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 f5f142d2165..bc41e1fef0c 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 d7b6692dc2c..092b1826b8d 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 5bb3fa1652a..41a15bca239 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 eb3ecd08a3d..6a16e2e9653 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 8f40a9ab85f..77cb6f17554 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 6c45e700e9b..8f3d77c3dfb 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 c809dd6beb3..d89add88cb1 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 bcb355c9632..08008d7d5cf 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 bd5504b6b46..46f440b6a02 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 04c88d34312..1ca8e9e6c81 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()