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) %}