1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Adds the __main__ conditional check (#2098)

As is done in other ansible modules, this adds the __main__ check
to the module so that the module code itself can be used as a library.
For instance, when testing the code.
This commit is contained in:
Tim Rupp 2016-04-25 12:34:18 -07:00 committed by Matt Clay
parent c0a677aa3a
commit a13141413a
7 changed files with 12 additions and 7 deletions

View file

@ -1687,4 +1687,3 @@ from ansible.module_utils.f5 import *
if __name__ == '__main__':
main()

View file

@ -445,5 +445,6 @@ def main():
# import module snippets
from ansible.module_utils.basic import *
from ansible.module_utils.f5 import *
main()
if __name__ == '__main__':
main()

View file

@ -469,5 +469,6 @@ def main():
# import module snippets
from ansible.module_utils.basic import *
from ansible.module_utils.f5 import *
main()
if __name__ == '__main__':
main()

View file

@ -379,5 +379,6 @@ def main():
# import module snippets
from ansible.module_utils.basic import *
from ansible.module_utils.f5 import *
main()
if __name__ == '__main__':
main()

View file

@ -521,4 +521,6 @@ def main():
# import module snippets
from ansible.module_utils.basic import *
from ansible.module_utils.f5 import *
main()
if __name__ == '__main__':
main()

View file

@ -466,4 +466,6 @@ def main():
# import module snippets
from ansible.module_utils.basic import *
from ansible.module_utils.f5 import *
main()
if __name__ == '__main__':
main()

View file

@ -483,4 +483,3 @@ from ansible.module_utils.f5 import *
if __name__ == '__main__':
main()