{% set var = role.var | default({}) %} {% if var %} ## Default Variables {% set columns = ["variable", "default", "description", "type", "deprecated", "example"] %} {% set found_columns = ["variable", "default"] + var.values() | map("list") | sum(start=["key"]) | unique | list %} {% for c in columns %} {% if c in found_columns %} | {{ c | capitalize }} {# trimnewline #} {% endif %} {% endfor %} | {% for c in columns %} {% if c in found_columns %} | {{ "-" * (c | length) }} {# trimnewline #} {% endif %} {% endfor %} | {% for key, item in var | dictsort %} | {{ key }} {# trimnewline #} | {{ (item.value | default({}))[key] | default }} {# trimnewline #} {% if "description" in found_columns %} | {{ item.description | default([]) | safe_join("
") | replace("\n", "
") | replace("|", "\|") }} {# trimnewline #} {% endif %} {% if "type" in found_columns %} | {{ item.type | default([]) | join("
") }} {# trimnewline #} {% endif %} {% if "deprecated" in found_columns %} | {{ item.deprecated | default }} {# trimnewline #} {% endif %} {% if "example" in found_columns %} | {{ item.example | default([]) | safe_join("
") | replace("\n", "
") | replace("|", "\|") }} {# trimnewline #} {% endif %} | {% endfor %} {% endif %}