Fix condition to add per subnet routes parameter

Fix condition to add per subnet {{network.name}}Routes_{{subnet}}
parameter to the network-environments file.

Change-Id: I38b8b899716bfd8c50c419761963a423e45397ea
This commit is contained in:
Martin Schuppert 2021-11-15 16:59:18 +01:00
parent efc328c668
commit 0474999379
2 changed files with 4 additions and 4 deletions

View File

@ -69,14 +69,14 @@ parameter_defaults:
{{network.name}}SubnetCidr_{{subnet}}: {{network.subnets[subnet]['ipv6_subnet']}}
{{network.name}}AllocationPools_{{subnet}}: {{network.subnets[subnet]['ipv6_allocation_pools']}}
{{network.name}}InterfaceDefaultRoute_{{subnet}}: {{network.subnets[subnet]['gateway_ipv6']}}
{%- if network.subnets[subnet][routes_ipv6] %}
{%- if network.subnets[subnet]['routes_ipv6'] is defined %}
{{network.name}}Routes_{{subnet}}: {{network.subnets[subnet]['routes_ipv6']|default([])}}
{%- endif %}
{%- else %}
{{network.name}}SubnetCidr_{{subnet}}: {{network.subnets[subnet]['ip_subnet']}}
{{network.name}}AllocationPools_{{subnet}}: {{network.subnets[subnet]['allocation_pools']}}
{{network.name}}InterfaceDefaultRoute_{{subnet}}: {{network.subnets[subnet]['gateway_ip']}}
{%- if network.subnets[subnet][routes] %}
{%- if network.subnets[subnet]['routes'] is defined %}
{{network.name}}Routes_{{subnet}}: {{network.subnets[subnet]['routes']|default([])}}
{%- endif %}
{%- endif %}

View File

@ -64,14 +64,14 @@ parameter_defaults:
{{network.name}}SubnetCidr_{{subnet}}: {{network.subnets[subnet]['ipv6_subnet']}}
{{network.name}}AllocationPools_{{subnet}}: {{network.subnets[subnet]['ipv6_allocation_pools']}}
{{network.name}}InterfaceDefaultRoute_{{subnet}}: {{network.subnets[subnet]['gateway_ipv6']}}
{%- if network.subnets[subnet][routes_ipv6] %}
{%- if network.subnets[subnet]['routes_ipv6'] is defined %}
{{network.name}}Routes_{{subnet}}: {{network.subnets[subnet]['routes_ipv6']|default([])}}
{%- endif %}
{%- else %}
{{network.name}}SubnetCidr_{{subnet}}: {{network.subnets[subnet]['ip_subnet']}}
{{network.name}}AllocationPools_{{subnet}}: {{network.subnets[subnet]['allocation_pools']}}
{{network.name}}InterfaceDefaultRoute_{{subnet}}: {{network.subnets[subnet]['gateway_ip']}}
{%- if network.subnets[subnet][routes] %}
{%- if network.subnets[subnet]['routes'] is defined %}
{{network.name}}Routes_{{subnet}}: {{network.subnets[subnet]['routes']|default([])}}
{%- endif %}
{%- endif %}