{% macro clamav_option(option) -%} {% set key = option.key.split('_') | map('capitalize') | join('') -%} {% if option.value is boolean -%} {{ key }} {{ 'yes' if option.value else 'no' }} {% elif option.value != None -%} {{ key }} {{ option.value }} {% endif -%} {% endmacro -%} {% if clamav_cfg[item.section] is mapping -%} {% for option in (clamav_cfg[item.section] | d({}) | dict2items) -%} {{ clamav_option(option) }} {%- endfor %} {% endif -%}