Fix vlan id assignment with additional subnets

_role_net_subnet contains the name of the subnet, so
_role_net_subnet.vlan will not return the correct configured
vlan id. This change uses network.subnets[_role_net_subnet].vlan
to get the configured vlan id.

Change-Id: Ifef98f45a57af508d7302584aa52eedd45316edd
Closes-Bug: #1840054
(cherry picked from commit 6745f86f2a)
This commit is contained in:
Martin Schuppert 2019-08-13 17:23:05 +02:00
parent e018bab3ba
commit 9af90d7401
1 changed files with 1 additions and 1 deletions

View File

@ -283,7 +283,7 @@ parameters:
{%- set _role_net_subnet = role.networks[network.name].get('subnet') %}
{%- if _subnets and _role_net_subnet and _role_net_subnet in _subnets %}
{{network.name}}NetworkVlanID_{{_role_net_subnet}}:
default: {{_role_net_subnet.vlan|default(1)}}
default: {{network.subnets[_role_net_subnet].vlan|default(1)}}
description: >
Vlan ID for the {{network.name_lower}} network traffic for subnet
{{_role_net_subnet}}.