{% macro controls(controls) %} controls { {% filter indent(bind9_config_indent, true) %} {% for control in controls %} {% if control.type == "inet" %} {{ ('inet ' + control.address) -}} {{ (' port ' + control.port | string) if control.port is defined and control.port -}} {{ (' allow {\n' + functions.simple_item_list(control.allow) + ' }') -}} {% elif control.type == "unix" %} {{ ('unix "' + control.path +'"') -}} {{ ('perm ' + control.perm | string) -}} {{ ('owner ' + control.owner | string) -}} {{ ('group ' + control.group | string) -}} {% endif %} {{ (' keys {\n' + functions.simple_item_list(control.keynames) + '}') if control.keynames is defined and control.keynames -}} {{ (' read-only ' + control.read_only | string) if control.read_only is defined -}}; {% endfor %}}; {% endfilter %} {% endmacro %}