Import friwall role from network ansible scripts
To reuse alpine and nginx roles. Probably going to merge repos at some point.
This commit is contained in:
parent
bacfc66f7c
commit
973522c373
14 changed files with 249 additions and 1 deletions
10
roles/friwall/templates/networks.json.j2
Normal file
10
roles/friwall/templates/networks.json.j2
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
{% 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 %}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue