diff --git a/network/config/bond-with-vlans/role.role.j2.yaml b/network/config/bond-with-vlans/role.role.j2.yaml index 2c5027a770..abb7472dba 100644 --- a/network/config/bond-with-vlans/role.role.j2.yaml +++ b/network/config/bond-with-vlans/role.role.j2.yaml @@ -25,7 +25,7 @@ parameters: Unless the default is changed, the parameter is automatically resolved from the subnet host_routes attribute. type: json -{% for network in networks %} +{% for network in networks if network.enabled|default(true) and network.name in role.networks %} {{network.name}}IpSubnet: default: '' description: IP address/subnet on the {{network.name_lower}} network diff --git a/network/config/multiple-nics/role.role.j2.yaml b/network/config/multiple-nics/role.role.j2.yaml index 9bb347ee7b..76aacc17fb 100644 --- a/network/config/multiple-nics/role.role.j2.yaml +++ b/network/config/multiple-nics/role.role.j2.yaml @@ -25,7 +25,7 @@ parameters: Unless the default is changed, the parameter is automatically resolved from the subnet host_routes attribute. type: json -{% for network in networks %} +{% for network in networks if network.enabled|default(true) and network.name in role.networks %} {{network.name}}IpSubnet: default: '' description: IP address/subnet on the {{network.name_lower}} network diff --git a/network/config/single-nic-linux-bridge-vlans/role.role.j2.yaml b/network/config/single-nic-linux-bridge-vlans/role.role.j2.yaml index e3a4a96bba..2222abac26 100644 --- a/network/config/single-nic-linux-bridge-vlans/role.role.j2.yaml +++ b/network/config/single-nic-linux-bridge-vlans/role.role.j2.yaml @@ -25,7 +25,7 @@ parameters: Unless the default is changed, the parameter is automatically resolved from the subnet host_routes attribute. type: json -{% for network in networks %} +{% for network in networks if network.enabled|default(true) and network.name in role.networks %} {{network.name}}IpSubnet: default: '' description: IP address/subnet on the {{network.name_lower}} network diff --git a/network/config/single-nic-vlans/role.role.j2.yaml b/network/config/single-nic-vlans/role.role.j2.yaml index 0f02e1a574..739952e982 100644 --- a/network/config/single-nic-vlans/role.role.j2.yaml +++ b/network/config/single-nic-vlans/role.role.j2.yaml @@ -25,7 +25,7 @@ parameters: Unless the default is changed, the parameter is automatically resolved from the subnet host_routes attribute. type: json -{% for network in networks %} +{% for network in networks if network.enabled|default(true) and network.name in role.networks %} {{network.name}}IpSubnet: default: '' description: IP address/subnet on the {{network.name_lower}} network