{% for option in (redis_cfg | d({}) | dict2items) -%} {% if option.value is boolean -%} {{ option.key }} {{ 'yes' if option.value else 'no' }} {% elif option.value | type_debug == 'list' -%} {{ option.key }} {{ option.value | join(' ') }} {% else -%} {{ option.key }} {{ option.value }} {% endif -%} {%- endfor %}