Call main in conditional way - packaging (#5826)

This commit is contained in:
Fabio Alessandro Locati 2016-12-05 18:00:18 +00:00 committed by Matt Clay
parent 17c80f6bbb
commit 5edbbabe0b
7 changed files with 16 additions and 7 deletions

View file

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

View file

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

View file

@ -556,4 +556,5 @@ def main():
from ansible.module_utils.basic import * from ansible.module_utils.basic import *
from ansible.module_utils.urls import * from ansible.module_utils.urls import *
main() if __name__ == '__main__':
main()

View file

@ -179,4 +179,5 @@ def main():
# this is magic, see lib/ansible/module_common.py # this is magic, see lib/ansible/module_common.py
from ansible.module_utils.basic import * from ansible.module_utils.basic import *
main() if __name__ == '__main__':
main()

View file

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

View file

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

View file

@ -422,4 +422,5 @@ def main():
module.exit_json(changed=True, msg="System successfully unregistered from %s." % rhn.hostname) module.exit_json(changed=True, msg="System successfully unregistered from %s." % rhn.hostname)
main() if __name__ == '__main__':
main()