summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Alessandro Locati <me@fale.io>2016-12-05 16:24:34 +0000
committerRyan Brown <sb@ryansb.com>2016-12-05 11:24:34 -0500
commit3620f419fff63de4a8de2c24f8e830e929c3ff32 (patch)
tree3de7ef2630c97d235773033f6a81696f24c38433
parent1825252033b01870cd528628b9f017c40c45a1ff (diff)
downloadansible-modules-extras-3620f419fff63de4a8de2c24f8e830e929c3ff32.tar.gz
Make `main()` calls conditional - web_infrastructure (#3653)
-rw-r--r--web_infrastructure/ejabberd_user.py3
-rw-r--r--web_infrastructure/jboss.py4
-rwxr-xr-xweb_infrastructure/jira.py4
3 files changed, 7 insertions, 4 deletions
diff --git a/web_infrastructure/ejabberd_user.py b/web_infrastructure/ejabberd_user.py
index 0f47167f..989145a3 100644
--- a/web_infrastructure/ejabberd_user.py
+++ b/web_infrastructure/ejabberd_user.py
@@ -221,4 +221,5 @@ def main():
module.exit_json(**result)
-main()
+if __name__ == '__main__':
+ main()
diff --git a/web_infrastructure/jboss.py b/web_infrastructure/jboss.py
index 53ffcf1f..8957f1b3 100644
--- a/web_infrastructure/jboss.py
+++ b/web_infrastructure/jboss.py
@@ -147,4 +147,6 @@ def main():
# import module snippets
from ansible.module_utils.basic import *
-main()
+
+if __name__ == '__main__':
+ main()
diff --git a/web_infrastructure/jira.py b/web_infrastructure/jira.py
index 479e623b..e7d1e1a9 100755
--- a/web_infrastructure/jira.py
+++ b/web_infrastructure/jira.py
@@ -385,5 +385,5 @@ def main():
module.exit_json(changed=True, meta=ret)
-
-main()
+if __name__ == '__main__':
+ main()