use dictsort filter in template

This commit is contained in:
Robert Kaussow 2019-11-18 09:23:03 +01:00
parent 89a281c2ca
commit 195e683c85
3 changed files with 3 additions and 2 deletions

View File

@ -5,3 +5,4 @@
* fix handling of multiline default values in template * fix handling of multiline default values in template
* FEATURE * FEATURE
* use explicit marker to convert annotation values to json * use explicit marker to convert annotation values to json
* use dictsort filter in template for ordered variable list

View File

@ -3,7 +3,7 @@
{% set var = role.var | default({}) %} {% set var = role.var | default({}) %}
{% if var %} {% if var %}
* [Default Variables](#default-variables) * [Default Variables](#default-variables)
{% for key, item in var.items() %} {% for key, item in var | dictsort %}
* [{{ key }}](#{{ key }}) * [{{ key }}](#{{ key }})
{% endfor %} {% endfor %}
{% endif %} {% endif %}

View File

@ -2,7 +2,7 @@
{% if var %} {% if var %}
## Default Variables ## Default Variables
{% for key, item in var.items() %} {% for key, item in var | dictsort %}
### {{ key }} ### {{ key }}
{% if item.description is defined and item.description %} {% if item.description is defined and item.description %}