diff --git a/manager/knot_resolver_manager/datamodel/local_data_schema.py b/manager/knot_resolver_manager/datamodel/local_data_schema.py index f0f1d2d00..b782d8e79 100644 --- a/manager/knot_resolver_manager/datamodel/local_data_schema.py +++ b/manager/knot_resolver_manager/datamodel/local_data_schema.py @@ -83,7 +83,7 @@ class LocalDataSchema(ConfigSchema): nodata: bool = True root_fallback_addresses: Optional[Dict[DomainName, ListOrItem[IPAddress]]] = None root_fallback_addresses_files: Optional[List[File]] = None - addresses: Optional[Dict[DomainName, IPAddress]] = None + addresses: Optional[Dict[DomainName, ListOrItem[IPAddress]]] = None addresses_files: Optional[List[File]] = None records: Optional[EscapedStr] = None subtrees: Optional[List[SubtreeSchema]] = None diff --git a/manager/knot_resolver_manager/datamodel/templates/macros/local_data_macros.lua.j2 b/manager/knot_resolver_manager/datamodel/templates/macros/local_data_macros.lua.j2 index 98819a8f3..71db5d4fc 100644 --- a/manager/knot_resolver_manager/datamodel/templates/macros/local_data_macros.lua.j2 +++ b/manager/knot_resolver_manager/datamodel/templates/macros/local_data_macros.lua.j2 @@ -19,9 +19,11 @@ hints.root_file('{{ file }}') {% macro local_data_addresses(pairs) -%} -{% for name, address in pairs.items() %} +{%- for name, addresses in pairs.items() -%} +{% for address in addresses %} assert(hints.set('{{ name }} {{ address }}').result == true) {% endfor %} +{%- endfor -%} {%- endmacro %}