servers/roles/friwall/templates/networks.json.j2

11 lines
481 B
Plaintext
Raw Normal View History

{
{% for vlan, addrs in prefixes | selectattr('vrf')
| selectattr('vlan') | selectattr('vlan.id', 'in', vlans|map(attribute='id'))
| sort(attribute='vlan.vid') | 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 }}
}{% if not loop.last %},{% endif +%}
{% endfor %}
}