diff --git a/lib/ansible/modules/system/cron.py b/lib/ansible/modules/system/cron.py index 36213092f99..5d9532064f4 100644 --- a/lib/ansible/modules/system/cron.py +++ b/lib/ansible/modules/system/cron.py @@ -771,5 +771,5 @@ def main(): # import module snippets from ansible.module_utils.basic import * -main() - +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/system/group.py b/lib/ansible/modules/system/group.py index ceffd75369b..a642a3ee3e2 100755 --- a/lib/ansible/modules/system/group.py +++ b/lib/ansible/modules/system/group.py @@ -466,4 +466,6 @@ def main(): # import module snippets from ansible.module_utils.basic import * -main() + +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/system/seboolean.py b/lib/ansible/modules/system/seboolean.py index 973b5b2d20b..6d3b312d588 100644 --- a/lib/ansible/modules/system/seboolean.py +++ b/lib/ansible/modules/system/seboolean.py @@ -219,4 +219,6 @@ def main(): # import module snippets from ansible.module_utils.basic import * from ansible.module_utils._text import to_bytes -main() + +if __name__ == '__main__': + main() diff --git a/lib/ansible/modules/system/service.py b/lib/ansible/modules/system/service.py index af97e7df5a4..4b22f2654f7 100644 --- a/lib/ansible/modules/system/service.py +++ b/lib/ansible/modules/system/service.py @@ -1568,4 +1568,5 @@ def main(): from ansible.module_utils.basic import * -main() +if __name__ == '__main__': + main()