diff --git a/docs/templates/plugin.rst.j2 b/docs/templates/plugin.rst.j2
index 9dba81f95e..1fe5507d26 100644
--- a/docs/templates/plugin.rst.j2
+++ b/docs/templates/plugin.rst.j2
@@ -74,8 +74,8 @@ The below requirements are needed on the local master node that executes this @{
{% if options -%}
-Options
--------
+Parameters
+----------
.. raw:: html
@@ -83,48 +83,56 @@ Options
{# Header of the documentation #}
Parameter |
- Default |
- Choices |
+ Choices/Defaults |
{% if plugin_type != 'module' %}
Configuration |
{% endif %}
- Comments |
+ Comments |
{% for key, value in options|dictsort recursive %}
- {# parameter name with introduced label #}
+ {# parameter name with required and/or introduced label #}
{% for i in range(1, loop.depth) %}
-
-
+
{% endfor %}
@{ key }@
{% if value.get('required', False) %} required {% endif %}
{% if value.version_added %} (added in @{value.version_added}@) {% endif %}
-
+
|
- {# default value #}
- {% if value.default %}@{ value.default | html_ify }@{% endif %} |
- {# choices #}
+ {# default / choices #}
- {% if value.type == 'bool' %}
-
- {% else %}
- {% if value.choices %}
-
- {% for choice in value.choices %}
- - @{ choice }@
- {% endfor %}
-
+ {% if value.default is defined %}
+ {% if value.default == true %}
+ {% set _x = value.update({'default': 'yes'}) %}
+ {% elif value.default == false %}
+ {% set _x = value.update({'default': 'no'}) %}
{% endif %}
{% endif %}
+ {% if value.type == 'bool' %}
+ {% set _x = value.update({'choices': ['no', 'yes']}) %}
+ {% endif %}
+ {% if value.choices %}
+ Choices:
+ {% if value.default not in value.choices %}
+ @{ value.default }@ ←
+ {% endif %}
+ {% for choice in value.choices %}
+ {% if value.default is defined and choice == value.default %}
+ @{ value.default }@ ←
+ {% else %}
+ - @{ choice }@
+ {% endif %}
+ {% endfor %}
+
+ {% elif value.default is defined %}
+ @{ value.default | html_ify }@
+ {% endif %}
|
{# configuration #}
@@ -162,7 +170,7 @@ Options
{% endfor %}
{% endif %}
{% if 'aliases' in value and value.aliases %}
- aliases: @{ value.aliases|join(', ') }@
+
aliases: @{ value.aliases|join(', ') }@
{% endif %}
@@ -176,7 +184,7 @@ Options
{% endif %}
{% endfor %}
-
+
{% endif %}