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
This commit is contained in:
Martin Schuppert 2019-08-13 17:23:05 +02:00
parent 461ee36dd0
commit 6745f86f2a

View File

@ -238,7 +238,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}}.