From ab37b30b3cd0139c339388c07779816d5e6888af Mon Sep 17 00:00:00 2001 From: chirac Date: Thu, 12 Jul 2018 01:20:11 +0200 Subject: [PATCH] Configure les ip sur tous les vlans --- templates/hp.tpl | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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