ansible / ansible-modules-core

Ansible modules - these modules ship with ansible
1.3k stars 1.95k forks source link

Call main in conditional way - cloud/rackspace #5833

Closed Fale closed 7 years ago

Fale commented 7 years ago
ISSUE TYPE
COMPONENT NAME

cloud/rackspace/*

ANSIBLE VERSION
2.2
SUMMARY

Use conditional main as for the 16th point of the module checklist at http://docs.ansible.com/ansible/dev_guide/developing_modules.html#module-checklist that reads:

Call your main() from a conditional so that it would be possible to import them into unittests in the future example:

if __name__ == '__main__':
    main()