mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
DOCS: standardize on EXAMPLES (a.k.a. Docs-JumboPatch JetLag Edition)
Migrated all examples: in DOCUMENTATION=''' string to standalone EXAMPLES=''' string Added deprecation warning to moduledev.rst and remove deprecated example from it Fixed up a few typos and uppercased some acronyms. add consistency to how EXAMPLES are formatted
This commit is contained in:
@@ -363,12 +363,9 @@ Include it in your module file like this::
|
||||
module: modulename
|
||||
short_description: This is a sentence describing the module
|
||||
# ... snip ...
|
||||
examples:
|
||||
- code: modulename opt1=arg1 opt2=arg2
|
||||
description: Optional words describing this example
|
||||
'''
|
||||
|
||||
The ``description``, ``notes`` and ``description`` within ``examples``
|
||||
The ``description``, and ``notes``
|
||||
support formatting in some of the output formats (e.g. ``rst``, ``man``).
|
||||
These formatting functions are ``U()``, ``M()``, ``I()``, and ``C()``
|
||||
for URL, module, italic, and constant-width respectively. It is suggested
|
||||
@@ -376,7 +373,7 @@ to use ``C()`` for file and option names, and ``I()`` when referencing
|
||||
parameters; module names should be specifies as ``M(module)``.
|
||||
|
||||
Examples (which typically contain colons, quotes, etc.) are difficult
|
||||
to format with YAML, so these can (alternatively, or additionally) be
|
||||
to format with YAML, so these must be
|
||||
written in plain text in an ``EXAMPLES`` string within the module
|
||||
like this::
|
||||
|
||||
@@ -385,7 +382,7 @@ like this::
|
||||
'''
|
||||
|
||||
The ``module_formatter.py`` script and ``ansible-doc(1)`` append the
|
||||
``EXAMPLES`` blob after any existing ``examples`` you may have in the
|
||||
``EXAMPLES`` blob after any existing (deprecated) ``examples`` you may have in the
|
||||
YAML ``DOCUMENTATION`` string.
|
||||
|
||||
Building & Testing
|
||||
|
||||
Reference in New Issue
Block a user