diff --git a/lib/ansible/modules/extras/packaging/dpkg_selections.py b/lib/ansible/modules/extras/packaging/dpkg_selections.py index 81dd849e599..bf13dc13fd7 100644 --- a/lib/ansible/modules/extras/packaging/dpkg_selections.py +++ b/lib/ansible/modules/extras/packaging/dpkg_selections.py @@ -75,4 +75,6 @@ def main(): from ansible.module_utils.basic import * -main() + +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/packaging/language/cpanm.py b/lib/ansible/modules/extras/packaging/language/cpanm.py index 26566c6dbf8..addf0c198d7 100644 --- a/lib/ansible/modules/extras/packaging/language/cpanm.py +++ b/lib/ansible/modules/extras/packaging/language/cpanm.py @@ -231,4 +231,5 @@ def main(): # import module snippets from ansible.module_utils.basic import * -main() +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/packaging/language/npm.py b/lib/ansible/modules/extras/packaging/language/npm.py index 58e29dc86e2..4b147e37035 100644 --- a/lib/ansible/modules/extras/packaging/language/npm.py +++ b/lib/ansible/modules/extras/packaging/language/npm.py @@ -286,4 +286,6 @@ def main(): # import module snippets from ansible.module_utils.basic import * -main() + +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/packaging/language/pear.py b/lib/ansible/modules/extras/packaging/language/pear.py index ae513baf142..880c275f25b 100644 --- a/lib/ansible/modules/extras/packaging/language/pear.py +++ b/lib/ansible/modules/extras/packaging/language/pear.py @@ -232,4 +232,5 @@ def main(): # import module snippets from ansible.module_utils.basic import * -main() +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/packaging/os/macports.py b/lib/ansible/modules/extras/packaging/os/macports.py index 19121f4a85c..81cf4827f1e 100644 --- a/lib/ansible/modules/extras/packaging/os/macports.py +++ b/lib/ansible/modules/extras/packaging/os/macports.py @@ -229,4 +229,5 @@ def main(): # import module snippets from ansible.module_utils.basic import * -main() +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/packaging/os/openbsd_pkg.py b/lib/ansible/modules/extras/packaging/os/openbsd_pkg.py index e68ef18989e..f86a4d081ae 100644 --- a/lib/ansible/modules/extras/packaging/os/openbsd_pkg.py +++ b/lib/ansible/modules/extras/packaging/os/openbsd_pkg.py @@ -543,4 +543,6 @@ def main(): # Import module snippets. from ansible.module_utils.basic import * -main() + +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/packaging/os/opkg.py b/lib/ansible/modules/extras/packaging/os/opkg.py index 1d740202408..50b37d3cdb5 100644 --- a/lib/ansible/modules/extras/packaging/os/opkg.py +++ b/lib/ansible/modules/extras/packaging/os/opkg.py @@ -182,4 +182,5 @@ def main(): # import module snippets from ansible.module_utils.basic import * -main() +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/packaging/os/pkg5.py b/lib/ansible/modules/extras/packaging/os/pkg5.py index 7f476e4bc06..bd10ad87c8f 100644 --- a/lib/ansible/modules/extras/packaging/os/pkg5.py +++ b/lib/ansible/modules/extras/packaging/os/pkg5.py @@ -167,4 +167,6 @@ def is_latest(module, package): from ansible.module_utils.basic import * -main() + +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/packaging/os/pkg5_publisher.py b/lib/ansible/modules/extras/packaging/os/pkg5_publisher.py index a540e36afb4..a1b1f4f1d52 100644 --- a/lib/ansible/modules/extras/packaging/os/pkg5_publisher.py +++ b/lib/ansible/modules/extras/packaging/os/pkg5_publisher.py @@ -202,4 +202,6 @@ def unstringify(val): from ansible.module_utils.basic import * -main() + +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/packaging/os/pkgutil.py b/lib/ansible/modules/extras/packaging/os/pkgutil.py index 8495a19b24c..5323581ba57 100644 --- a/lib/ansible/modules/extras/packaging/os/pkgutil.py +++ b/lib/ansible/modules/extras/packaging/os/pkgutil.py @@ -225,4 +225,6 @@ def main(): # import module snippets from ansible.module_utils.basic import * -main() + +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/packaging/os/portage.py b/lib/ansible/modules/extras/packaging/os/portage.py index 0f3731968bc..dc4c22890f6 100644 --- a/lib/ansible/modules/extras/packaging/os/portage.py +++ b/lib/ansible/modules/extras/packaging/os/portage.py @@ -513,4 +513,5 @@ def main(): # import module snippets from ansible.module_utils.basic import * -main() +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/packaging/os/portinstall.py b/lib/ansible/modules/extras/packaging/os/portinstall.py index 44f21efb7c7..78555a02194 100644 --- a/lib/ansible/modules/extras/packaging/os/portinstall.py +++ b/lib/ansible/modules/extras/packaging/os/portinstall.py @@ -209,4 +209,5 @@ def main(): # import module snippets from ansible.module_utils.basic import * -main() +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/packaging/os/slackpkg.py b/lib/ansible/modules/extras/packaging/os/slackpkg.py index 0581fbd1918..4945403bb97 100644 --- a/lib/ansible/modules/extras/packaging/os/slackpkg.py +++ b/lib/ansible/modules/extras/packaging/os/slackpkg.py @@ -201,4 +201,5 @@ def main(): # import module snippets from ansible.module_utils.basic import * -main() +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/packaging/os/svr4pkg.py b/lib/ansible/modules/extras/packaging/os/svr4pkg.py index c31a1004647..8f1528c938b 100644 --- a/lib/ansible/modules/extras/packaging/os/svr4pkg.py +++ b/lib/ansible/modules/extras/packaging/os/svr4pkg.py @@ -258,4 +258,6 @@ def main(): # import module snippets from ansible.module_utils.basic import * -main() + +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/packaging/os/swdepot.py b/lib/ansible/modules/extras/packaging/os/swdepot.py index 8c7652af966..017e91b0b58 100644 --- a/lib/ansible/modules/extras/packaging/os/swdepot.py +++ b/lib/ansible/modules/extras/packaging/os/swdepot.py @@ -202,5 +202,5 @@ def main(): # import module snippets from ansible.module_utils.basic import * -main() - +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/packaging/os/urpmi.py b/lib/ansible/modules/extras/packaging/os/urpmi.py index 47d7c1f6846..934ef11ee22 100644 --- a/lib/ansible/modules/extras/packaging/os/urpmi.py +++ b/lib/ansible/modules/extras/packaging/os/urpmi.py @@ -209,4 +209,5 @@ def main(): # import module snippets from ansible.module_utils.basic import * -main() +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/extras/packaging/os/zypper_repository.py b/lib/ansible/modules/extras/packaging/os/zypper_repository.py index 40510db9a98..7fae6065bcb 100644 --- a/lib/ansible/modules/extras/packaging/os/zypper_repository.py +++ b/lib/ansible/modules/extras/packaging/os/zypper_repository.py @@ -406,4 +406,5 @@ def main(): # import module snippets from ansible.module_utils.basic import * -main() +if __name__ == '__main__': + main()