diff --git a/docs/templates/plugin.rst.j2 b/docs/templates/plugin.rst.j2 index aae36a2e726..47d7aa02144 100644 --- a/docs/templates/plugin.rst.j2 +++ b/docs/templates/plugin.rst.j2 @@ -3,14 +3,13 @@ .. _@{ module }@: {% if short_description %} -{% set title = module + ' - ' + short_description|convert_symbols_to_format %} +{% set title = module + ' - ' + short_description|convert_symbols_to_format %} {% else %} -{% set title = module %} +{% set title = module %} {% endif %} -{% set title_len = title|length %} @{ title }@ -@{ '+' * title_len }@ +@{ '+' * title|length }@ {% if version_added is defined and version_added != '' -%} .. versionadded:: @{ version_added | default('') }@ @@ -48,13 +47,13 @@ Synopsis {% if description %} -{% if description is string -%} +{% if description is string -%} * @{ description | convert_symbols_to_format }@ -{% else %} -{% for desc in description -%} +{% else %} +{% for desc in description -%} * @{ desc | convert_symbols_to_format }@ -{% endfor %} -{% endif %} +{% endfor %} +{% endif %} {% endif %} @@ -66,17 +65,17 @@ Aliases: @{ ','.join(aliases) }@ {% endif %} {% if requirements %} -{% set req = 'Requirements' %} -{% if plugin_type == 'module' %} -{% set req = req + ' (on host that executes module)' %} -{% endif %} -{% set req_len = req|length %} +{% set req = 'Requirements' %} +{% if plugin_type == 'module' %} +{% set req = req + ' (on host that executes module)' %} +{% endif %} +{% set req_len = req|length %} @{ req }@ @{ '-' * req_len }@ -{% for req in requirements %} +{% for req in requirements %} * @{ req | convert_symbols_to_format }@ -{% endfor %} +{% endfor %} {% endif %} @@ -91,14 +90,14 @@ Options
parameter |
- required |
- default |
- choices |
+ Parameter |
+ Required? |
+ Default |
+ Choices |
{% if plugin_type != 'module' %}
- configuration |
+ Configuration |
{% endif %}
- comments |
+ Comments |
|||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{% if value.get('required', False) %}required{% else %}optional{% endif %} |
+ {% if value.get('required', False) %}required{% endif %} |
{# default value #}
- {% if value.default %}@{ value.default }@{% endif %} |
+ {% if value.default %}@{ value.default | html_ify }@{% endif %} |
{# choices #}
@@ -197,11 +196,11 @@ Examples
.. code-block:: yaml
-{% for example in examples %}
-{% if example['description'] %}@{ example['description'] | indent(4, True) }@{% endif %}
+{% for example in examples %}
+{% if example['description'] %}@{ example['description'] | indent(4, True) }@{% endif %}
@{ example['code'] | escape | indent(4, True) }@
-{% endfor %}
-{% if plainexamples %}@{ plainexamples | indent(4, True) }@{% endif %}
+{% endfor %}
+{% if plainexamples %}@{ plainexamples | indent(4, True) }@{% endif %}
{% endif %}
@@ -217,11 +216,11 @@ Common return values are documented :ref:`here
|