From 21df85e97ab183da3e602267ec8dfd6208afe86a Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Mon, 21 Oct 2024 15:35:32 +0200 Subject: [PATCH] dnsmasq: sort ranges by network name --- roles/dnsmasq/templates/10-ranges.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/dnsmasq/templates/10-ranges.conf.j2 b/roles/dnsmasq/templates/10-ranges.conf.j2 index aeae88f..a5a94ca 100644 --- a/roles/dnsmasq/templates/10-ranges.conf.j2 +++ b/roles/dnsmasq/templates/10-ranges.conf.j2 @@ -1,4 +1,4 @@ -{% for prefix in prefixes | selectattr('custom_fields.dhcp_server') %} +{% for prefix in prefixes | selectattr('custom_fields.dhcp_server') | sort(attribute='vlan.name') %} {% if prefix.custom_fields.dhcp_server.address | ipaddr('address') == primary_ip4 %} # {{ prefix.vlan.name }} {% for range in prefix.custom_fields.dhcp_ranges | default([], true) %}