Docsite: improve developing_modules_documenting.rst (#71590)

* Docsite: improve developing_modules_documenting.rst

* add necessary dots to returns descriptions
pull/71610/head
Andrew Klychkov 4 years ago committed by GitHub
parent cda5854099
commit bfba0ffc45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -330,13 +330,15 @@ Per playbook best practices, each example should include a ``name:`` line::
EXAMPLES = r''' EXAMPLES = r'''
- name: Ensure foo is installed - name: Ensure foo is installed
modulename: namespace.collection.modulename:
name: foo name: foo
state: present state: present
''' '''
The ``name:`` line should be capitalized and not include a trailing dot. The ``name:`` line should be capitalized and not include a trailing dot.
Use a fully qualified collection name (FQCN) as a part of the module's name like in the example above. For modules in ``ansible-base``, use the ``ansible.builtin.`` identifier, for example ``ansible.builtin.debug``.
If your examples use boolean options, use yes/no values. Since the documentation generates boolean values as yes/no, having the examples use these values as well makes the module documentation more consistent. If your examples use boolean options, use yes/no values. Since the documentation generates boolean values as yes/no, having the examples use these values as well makes the module documentation more consistent.
If your module returns facts that are often needed, an example of how to use them can be helpful. If your module returns facts that are often needed, an example of how to use them can be helpful.
@ -392,12 +394,12 @@ Here are two example ``RETURN`` sections, one with three simple fields and one w
RETURN = r''' RETURN = r'''
packages: packages:
description: Information about package requirements description: Information about package requirements.
returned: success returned: success
type: complex type: complex
contains: contains:
missing: missing:
description: Packages that are missing from the system description: Packages that are missing from the system.
returned: success returned: success
type: list type: list
sample: sample:

Loading…
Cancel
Save