diff --git a/lib/ansible/modules/extras/network/citrix/netscaler.py b/lib/ansible/modules/extras/network/citrix/netscaler.py index b7465267424..c84cf740bd2 100644 --- a/lib/ansible/modules/extras/network/citrix/netscaler.py +++ b/lib/ansible/modules/extras/network/citrix/netscaler.py @@ -201,4 +201,6 @@ def main(): from ansible.module_utils.basic import * from ansible.module_utils.urls import * from ansible.module_utils.pycompat24 import get_exception -main() + +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/network/dnsimple.py b/lib/ansible/modules/extras/network/dnsimple.py index a356529ffc6..a11f2a3f5ee 100644 --- a/lib/ansible/modules/extras/network/dnsimple.py +++ b/lib/ansible/modules/extras/network/dnsimple.py @@ -335,4 +335,5 @@ def main(): 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/network/dnsmadeeasy.py b/lib/ansible/modules/extras/network/dnsmadeeasy.py index eac0859c1f5..c4007542a66 100644 --- a/lib/ansible/modules/extras/network/dnsmadeeasy.py +++ b/lib/ansible/modules/extras/network/dnsmadeeasy.py @@ -393,4 +393,5 @@ def main(): from ansible.module_utils.basic import * from ansible.module_utils.urls import * -main() +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/network/haproxy.py b/lib/ansible/modules/extras/network/haproxy.py index d1502de6f3b..4cfc8128674 100644 --- a/lib/ansible/modules/extras/network/haproxy.py +++ b/lib/ansible/modules/extras/network/haproxy.py @@ -386,5 +386,5 @@ def main(): # import module snippets from ansible.module_utils.basic import * -main() - +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/network/illumos/dladm_etherstub.py b/lib/ansible/modules/extras/network/illumos/dladm_etherstub.py index 9e2bf2b1734..3107f8e843e 100644 --- a/lib/ansible/modules/extras/network/illumos/dladm_etherstub.py +++ b/lib/ansible/modules/extras/network/illumos/dladm_etherstub.py @@ -172,4 +172,6 @@ def main(): module.exit_json(**result) from ansible.module_utils.basic import * -main() + +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/network/illumos/dladm_vnic.py b/lib/ansible/modules/extras/network/illumos/dladm_vnic.py index 8cf81e23a2f..c9d10a083eb 100644 --- a/lib/ansible/modules/extras/network/illumos/dladm_vnic.py +++ b/lib/ansible/modules/extras/network/illumos/dladm_vnic.py @@ -265,4 +265,6 @@ def main(): module.exit_json(**result) from ansible.module_utils.basic import * -main() + +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/network/illumos/flowadm.py b/lib/ansible/modules/extras/network/illumos/flowadm.py index ec93d6a0f64..82e0250b701 100644 --- a/lib/ansible/modules/extras/network/illumos/flowadm.py +++ b/lib/ansible/modules/extras/network/illumos/flowadm.py @@ -514,4 +514,6 @@ def main(): from ansible.module_utils.basic import * -main() + +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/network/illumos/ipadm_if.py b/lib/ansible/modules/extras/network/illumos/ipadm_if.py index d2bff90e3bc..06db3b6a656 100644 --- a/lib/ansible/modules/extras/network/illumos/ipadm_if.py +++ b/lib/ansible/modules/extras/network/illumos/ipadm_if.py @@ -223,4 +223,6 @@ def main(): module.exit_json(**result) from ansible.module_utils.basic import * -main() + +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/network/illumos/ipadm_prop.py b/lib/ansible/modules/extras/network/illumos/ipadm_prop.py index 5399189ad35..15410eb5e09 100644 --- a/lib/ansible/modules/extras/network/illumos/ipadm_prop.py +++ b/lib/ansible/modules/extras/network/illumos/ipadm_prop.py @@ -261,4 +261,6 @@ def main(): from ansible.module_utils.basic import * -main() + +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/network/lldp.py b/lib/ansible/modules/extras/network/lldp.py index 6624420404e..42915d70c97 100644 --- a/lib/ansible/modules/extras/network/lldp.py +++ b/lib/ansible/modules/extras/network/lldp.py @@ -83,5 +83,6 @@ def main(): # import module snippets from ansible.module_utils.basic import * -main() +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/network/nmcli.py b/lib/ansible/modules/extras/network/nmcli.py index 1b5d9b310b0..97bea2e255e 100644 --- a/lib/ansible/modules/extras/network/nmcli.py +++ b/lib/ansible/modules/extras/network/nmcli.py @@ -1190,4 +1190,5 @@ def main(): module.exit_json(**result) -main() +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/network/openvswitch_bridge.py b/lib/ansible/modules/extras/network/openvswitch_bridge.py index 0cbf3096b20..1b9a7f7abf9 100644 --- a/lib/ansible/modules/extras/network/openvswitch_bridge.py +++ b/lib/ansible/modules/extras/network/openvswitch_bridge.py @@ -308,4 +308,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/network/openvswitch_db.py b/lib/ansible/modules/extras/network/openvswitch_db.py index 8c2a290a913..39f27649cfb 100644 --- a/lib/ansible/modules/extras/network/openvswitch_db.py +++ b/lib/ansible/modules/extras/network/openvswitch_db.py @@ -137,4 +137,6 @@ def main(): # import module snippets from ansible.module_utils.basic import * -main() + +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/network/openvswitch_port.py b/lib/ansible/modules/extras/network/openvswitch_port.py index b0e0fe477e6..0939a71341e 100644 --- a/lib/ansible/modules/extras/network/openvswitch_port.py +++ b/lib/ansible/modules/extras/network/openvswitch_port.py @@ -285,4 +285,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/network/snmp_facts.py b/lib/ansible/modules/extras/network/snmp_facts.py index b8ae753770d..eee7a4690ba 100644 --- a/lib/ansible/modules/extras/network/snmp_facts.py +++ b/lib/ansible/modules/extras/network/snmp_facts.py @@ -367,4 +367,5 @@ def main(): module.exit_json(ansible_facts=results) -main() +if __name__ == '__main__': + main()