mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-03 23:14:02 -07:00
Add support for additional EXAMPLES string in Ansible modules
return DOC and EXAMPLES as a list add moduledev explanation more
This commit is contained in:
parent
093935ede1
commit
396a07bcc7
7 changed files with 50 additions and 7 deletions
|
@ -354,6 +354,19 @@ for URL, module, italic, and constant-width respectively. It is suggested
|
|||
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
|
||||
written in plain text in an ``EXAMPLES`` string within the module
|
||||
like this::
|
||||
|
||||
EXAMPLES = '''
|
||||
- action: modulename opt1=arg1 opt2=arg2
|
||||
'''
|
||||
|
||||
The ``module_formatter.py`` script and ``ansible-doc(1)`` append the
|
||||
``EXAMPLES`` blob after any existing ``examples`` you may have in the
|
||||
YAML ``DOCUMENTATION`` string.
|
||||
|
||||
Building & Testing
|
||||
++++++++++++++++++
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue