diff --git a/CHANGELOG.md b/CHANGELOG.md index 0940cbf..80dfd1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ * BUGFIX * add missing default for `role_dir` * fix value mapping in jinja2 source dict + * add missing exception handling for dict merge + * fix handling of multiline default values in template * FEATURE * use explicit marker to convert annotation values to json diff --git a/ansibledoctor/templates/readme/_vars.j2 b/ansibledoctor/templates/readme/_vars.j2 index 9777336..afea397 100644 --- a/ansibledoctor/templates/readme/_vars.j2 +++ b/ansibledoctor/templates/readme/_vars.j2 @@ -14,7 +14,13 @@ #### Default value ```YAML +{% if item.value is mapping %} {{ item.value | to_nice_yaml(indent=2) }} +{% else %} +{% for ve_line in item.example %} +{{ ve_line }} +{% endfor %} +{% endif %} ``` {% endif %} {% if item.example is defined and item.example %}