diff --git a/templates/hp.tpl b/templates/hp.tpl index 98150cc..eebed11 100644 --- a/templates/hp.tpl +++ b/templates/hp.tpl @@ -43,17 +43,17 @@ vlan {{ id }} {%- endif %} {%- if vlan["ports_untagged"] %} untagged {{ vlan["ports_untagged"]|join(',') }} + {%- endif %} + {%- for ipv4, subnet in switch.interfaces_subnet.items() %} + {%- if subnet.0.vlan_id == id %} + ip address {{ ipv4 }}/{{ subnet.0.netmask_cidr }} {%- endif %} - {%- if switch.subnet.0.vlan_id == id %} - ip address {{ switch.ipv4 }}/{{ switch.subnet.0.netmask_cidr }} - {%- else %} - no ip address - {%- endif %} - {%- if switch.subnet.0.vlan_id == id %} - ipv6 address {{ switch.ipv6 }}/{{ switch.subnet6.netmask_cidr }} - {%- else %} - no ipv6 enable + {%- endfor %} + {%- for ipv6, subnet6 in switch.interfaces6_subnet.items() %} + {%- if subnet6.vlan_id == id %} + ipv6 address {{ ipv6 }}/{{ subnet6.netmask_cidr }} {%- endif %} + {%- endfor %} {%- if id in additionals.igmp_vlans %} ip igmp no ip igmp querier