network/roles/firewall_master/templates/networks.json.j2

9 lines
342 B
Plaintext
Raw Normal View History

2023-12-18 10:22:14 +00:00
{
{% for vlan, addrs in vrf_prefixes | groupby('vlan.vid') %}
"{{ addrs[0].vlan.name }}": {
"ip": {{ addrs | selectattr('family.value', '==', 4) | map(attribute='prefix') | to_json }},
"ip6": {{ addrs | selectattr('family.value', '==', 6) | map(attribute='prefix') | to_json }}
2023-12-18 10:22:14 +00:00
}{% if not loop.last %},{% endif +%}
{% endfor %}
}