mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00: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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user