diff --git a/roles/firewall/templates/networks.nft.j2 b/roles/firewall/templates/networks.nft.j2 index a280c75..2a13f6e 100644 --- a/roles/firewall/templates/networks.nft.j2 +++ b/roles/firewall/templates/networks.nft.j2 @@ -2,7 +2,7 @@ {% set prefixes = query('netbox.netbox.nb_lookup', 'prefixes', api_filter='vlan_id='~vlan.id, raw_data=true) %} {% set prefixes4 = prefixes | selectattr('family.value', '==', 4) | map(attribute='prefix') %} {% set prefixes6 = prefixes | selectattr('family.value', '==', 6) | map(attribute='prefix') %} -set {{ vlan.name }} { +set {{ vlan.name }} { type ipv4_addr; flags interval {% if prefixes4 %} elements = { {{ prefixes4 | join(', ') }} }