c05b61777c
* Update windows_setup.rst (#55535): Wrong protocol and port in command. (cherry picked from commit6ea3eca8ff
) * Clarify the two targets of vault encryption, with notes about advantages and drawbacks of each Co-Authored-By: tacatac <taca@kadisius.eu> (cherry picked from commit79198cad7a
) * Improve consistency of loop documentation (#55674) (cherry picked from commita5cb47d697
) * Add Microsoft Document URL for WinRM Memory Hotfix (#55680) Co-Authored-By: hiyokotaisa <thel.vadam2485@gmail.com> (cherry picked from commit7b86208fcd
) * Clarify the documentation for `async` and `poll`; describe the behavior when `poll` = 0 and when it does not. Co-Authored-By: tacatac <taca@kadisius.eu> (cherry picked from commitdbc64ae64c
) * Add security group info and example to AWS guide (#55783): expand documentation on how to use lookup plugin aws_service_ip_ranges with ec2_group module (cherry picked from commitbb5059f2c7
) * correct description of modules vs plugins (#55784) (cherry picked from commit9d5b5d7ddd
) * Fix var naming (#55795): Make vars match tasks in Google Compute guide. (cherry picked from commit943f7334c5
) * Clarifies how Ansible processes multiple `failed_when` conditions (#55941): multiple failed_when conditions join with AND not OR to counter third-party pages online incorrectly stating that it uses `OR`. ([example](https://groups.google.com/d/msg/ansible-project/cIaQTmY3ZLE/c5w8rlmdHWIJ)). (cherry picked from commit5439eb8bd8
) * Docs: edits & expands module_utils & search path info in dev guide (#55931) (cherry picked from commit8542459b95
) * Add faq note about ssh ServerAliveInterval (#55568) (cherry picked from commit76dba7aa4f
) * docsite: correct path, list requirements for testing module docs, etc. (#52008) * dev_guide: correct path, list requirements, etc.; module HTML docs are in '_build/html/module' subdir (cherry picked from commitb14f477bee
) * Developer documentation update involving module invocation (#55747) * Update docs for the 2.7 change to AnsiballZ which invokes modules with one less Python interpreter * Add a section on how module results are returned and on trust between modules, action plugins, and the executor. * Update docs/docsite/rst/dev_guide/developing_program_flow_modules.rst Co-Authored-By: abadger <a.badger@gmail.com> (cherry picked from commitedafa71f42
) * add doc example of multiline failed_when with OR (#56007) * add variety to multiple OR failed_when doc example (cherry picked from commit7d5ada7161
) * Note that by default the regex test is identical to match, but can do much more (#50205) * Note that the regex test behaves like 'match', with default settings (cherry picked from commit86e98c5213
) * more info on how vaults work (#56183) also add warning about what it covers. (cherry picked from commit8ff27c4e0c
) * Fix var naming in GCE guide (cherry picked from commitdae5564e2b
) * dev_guide: Various small updates (#53273) * Document the clarifications that I usually remark when doing reviews * Update docs/docsite/rst/dev_guide/developing_modules_documenting.rst Co-Authored-By: dagwieers <dag@wieers.com> (cherry picked from commiteac7f1fb58
) * Lack of "--update" flag in older Ubuntu distros (#56283): when installing on older Ubuntu distributions be aware of the lack of ``-u`` or ``--update`` flag. (cherry picked from commitdd0b0ae47b
) * should have gone into 52373 (#56306) (cherry picked from commit3c8d8b1509
)
36 lines
1.6 KiB
ReStructuredText
36 lines
1.6 KiB
ReStructuredText
:orphan:
|
|
|
|
.. _testing_module_documentation:
|
|
|
|
****************************
|
|
Testing module documentation
|
|
****************************
|
|
|
|
Before you submit a module for inclusion in the main Ansible repo, you must test your module documentation for correct HTML rendering and to ensure that the argspec matches the documentation in your Python file. The community pages offer more information on :ref:`testing reStructuredText documentation <testing_documentation_locally>`.
|
|
|
|
To check the HTML output of your module documentation:
|
|
|
|
#. Ensure working :ref:`development environment <environment_setup>`.
|
|
#. Install required Python packages (drop '--user' in venv/virtualenv):
|
|
|
|
.. code-block:: bash
|
|
|
|
pip install --user -r requirements.txt
|
|
pip install --user -r docs/docsite/requirements.txt
|
|
|
|
#. Ensure your module is in the correct directory: ``lib/ansible/modules/$CATEGORY/mymodule.py``.
|
|
#. Build HTML from your module documentation: ``MODULES=mymodule make webdocs``.
|
|
#. To build the HTML documentation for multiple modules, use a comma-separated list of module names: ``MODULES=mymodule,mymodule2 make webdocs``.
|
|
#. View the HTML page at ``file:///path/to/docs/docsite/_build/html/modules/mymodule_module.html``.
|
|
|
|
To ensure that your module documentation matches your ``argument_spec``:
|
|
|
|
#. Install required Python packages (drop '--user' in venv/virtualenv):
|
|
|
|
.. code-block:: bash
|
|
|
|
pip install --user -r test/runner/requirements/sanity.txt
|
|
|
|
#. run the ``validate-modules`` test::
|
|
|
|
./test/sanity/validate-modules/validate-modules --arg-spec --warnings lib/ansible/modules/$CATEGORY/mymodule.py
|