From de7b0e9da18578ae8a29cdd9c34af7f7478a8431 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Tue, 24 May 2016 15:09:44 -0400 Subject: [PATCH] made `def main` an explicit requirement --- docsite/rst/developing_modules.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docsite/rst/developing_modules.rst b/docsite/rst/developing_modules.rst index 265bab598de..f8ae612833f 100644 --- a/docsite/rst/developing_modules.rst +++ b/docsite/rst/developing_modules.rst @@ -695,6 +695,7 @@ The following checklist items are important guidelines for people who want to c * The return structure should be consistent, even if NA/None are used for keys normally returned under other options. * Are module actions idempotent? If not document in the descriptions or the notes. * Import module snippets `from ansible.module_utils.basic import *` at the bottom, conserves line numbers for debugging. +* The module must have a `main` function that wraps the normal execution. * Call your :func:`main` from a conditional so that it would be possible to import them into unittests in the future example::