15.3. controller.j2
--- {% set mtu_list = [ctlplane_mtu] %} {% for network in role_networks if network not in 'Tenant,External' %} {{ mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }} {%- endfor %} {% set min_viable_mtu = mtu_list | max %} network_config: - type: interface name: nic1 use_dhcp: false addresses: - ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_subnet_cidr }} routes: - ip_netmask: 169.254.169.254/32 next_hop: {{ ctlplane_ip }} - type: linux_bond name: bond_api mtu: {{ min_viable_mtu }} bonding_options: mode=active-backup use_dhcp: false dns_servers: {{ ctlplane_dns_nameservers }} members: - type: interface name: nic2 primary: true - type: interface name: nic3 {% for network in role_networks if network not in 'Tenant,External' %} - type: vlan mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }} device: bond_api vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }} addresses: - ip_netmask: {{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }} {% endfor %} - type: ovs_bridge name: br-tenant use_dhcp: false mtu: 9000 members: - type: interface name: nic4 mtu: 9000 - type: vlan vlan_id: {{ lookup('vars', networks_lower['Tenant'] ~ '_vlan_id') }} mtu: 9000 addresses: - ip_netmask: {{ lookup('vars', networks_lower['Tenant'] ~ '_ip') }}/{{ lookup('vars', networks_lower['Tenant'] ~ '_cidr') }} - type: ovs_bridge name: br-ex use_dhcp: false mtu: 9000 members: - type: interface name: nic5 mtu: 9000 - type: vlan vlan_id: {{ lookup('vars', networks_lower['External'] ~ '_vlan_id') }} mtu: 9000 addresses: - ip_netmask: {{ lookup('vars', networks_lower['External'] ~ '_ip') }}/{{ lookup('vars', networks_lower['External'] ~ '_cidr') }} routes: - default: true next_hop: {{ lookup('vars', networks_lower['External'] ~ '_gateway_ip') }}