summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Alessandro Locati <fale@redhat.com>2016-12-05 17:04:51 +0000
committerFabio Alessandro Locati <fale@redhat.com>2016-12-05 17:04:51 +0000
commita598c9bc92944e3a7c86d1d5df55616faa72869f (patch)
tree0e3c8367b9485877a5001a28c18f29b59c93a596
parent60b82f757dade5eefea905f97a4ebdc1d9ef1937 (diff)
downloadansible-modules-core-a598c9bc92944e3a7c86d1d5df55616faa72869f.tar.gz
Call main in conditional way - system
-rw-r--r--system/cron.py4
-rw-r--r--system/group.py4
-rw-r--r--system/seboolean.py4
-rw-r--r--system/service.py3
4 files changed, 10 insertions, 5 deletions
diff --git a/system/cron.py b/system/cron.py
index 34307c6b..3157b48b 100644
--- a/system/cron.py
+++ b/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/system/group.py b/system/group.py
index ceffd753..a642a3ee 100644
--- a/system/group.py
+++ b/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/system/seboolean.py b/system/seboolean.py
index 973b5b2d..6d3b312d 100644
--- a/system/seboolean.py
+++ b/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/system/service.py b/system/service.py
index af97e7df..4b22f265 100644
--- a/system/service.py
+++ b/system/service.py
@@ -1568,4 +1568,5 @@ def main():
from ansible.module_utils.basic import *
-main()
+if __name__ == '__main__':
+ main()