{% for option in (ntp_cfg | d({}) | dict2items) -%} {% if (option.value | type_debug == 'list') -%} {% for suboption in option.value -%} {{- option.key }} {{ suboption }} {% endfor -%} {% else -%} {{- option.key }} {{ option.value }} {% endif -%} {% endfor -%}