Browse Source

Merge "Drop use of role_networks_lower"

changes/77/765677/1
Zuul 5 months ago
committed by Gerrit Code Review
parent
commit
9f071bad6d
14 changed files with 99 additions and 99 deletions
  1. +10
    -10
      tripleo_ansible/roles/tripleo_network_config/templates/2_linux_bonds_vlans/2_linux_bonds_vlans.j2
  2. +9
    -9
      tripleo_ansible/roles/tripleo_network_config/templates/2_linux_bonds_vlans/2_linux_bonds_vlans_dpdk.j2
  3. +5
    -5
      tripleo_ansible/roles/tripleo_network_config/templates/bonds_vlans/bonds_vlans.j2
  4. +5
    -5
      tripleo_ansible/roles/tripleo_network_config/templates/bonds_vlans/bonds_vlans_dpdk.j2
  5. +5
    -5
      tripleo_ansible/roles/tripleo_network_config/templates/bonds_vlans/bonds_vlans_storage.j2
  6. +8
    -8
      tripleo_ansible/roles/tripleo_network_config/templates/multiple_nics/multiple_nics.j2
  7. +8
    -8
      tripleo_ansible/roles/tripleo_network_config/templates/multiple_nics/multiple_nics_dpdk.j2
  8. +12
    -12
      tripleo_ansible/roles/tripleo_network_config/templates/multiple_nics_vlans/multiple_nics_vlans.j2
  9. +12
    -12
      tripleo_ansible/roles/tripleo_network_config/templates/multiple_nics_vlans/multiple_nics_vlans_dpdk.j2
  10. +5
    -5
      tripleo_ansible/roles/tripleo_network_config/templates/single_nic_linux_bridge_vlans/single_nic_linux_bridge_vlans.j2
  11. +5
    -5
      tripleo_ansible/roles/tripleo_network_config/templates/single_nic_linux_bridge_vlans/single_nic_linux_bridge_vlans_storage.j2
  12. +5
    -5
      tripleo_ansible/roles/tripleo_network_config/templates/single_nic_vlans/controller_no_external.j2
  13. +5
    -5
      tripleo_ansible/roles/tripleo_network_config/templates/single_nic_vlans/single_nic_vlans.j2
  14. +5
    -5
      tripleo_ansible/roles/tripleo_network_config/templates/single_nic_vlans/single_nic_vlans_storage.j2

+ 10
- 10
tripleo_ansible/roles/tripleo_network_config/templates/2_linux_bonds_vlans/2_linux_bonds_vlans.j2 View File

@ -8,14 +8,14 @@
{# The bridge, bond or interface must have an MTU to allow the VLAN with the #}
{# largest MTU. #}
{% if network.startswith('Tenant') %}
{{ mtu_dataplane_list.append(lookup('vars', role_networks_lower[network] ~ '_mtu')) }}
{{ mtu_dataplane_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }}
{# This block resolves the minimum viable MTU for interfaces connected to #}
{# the control plane network(s) (don't start by "Tenant"), and also bonds #}
{# and bridges that carry multiple VLANs. Each VLAN may have different MTU. #}
{# The bridge, bond or interface must have an MTU to allow the VLAN with the #}
{# largest MTU. #}
{% else %}
{{ mtu_ctlplane_list.append(lookup('vars', role_networks_lower[network] ~ '_mtu')) }}
{{ mtu_ctlplane_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }}
{%- endfor %}
{% set min_viable_mtu_ctlplane = mtu_ctlplane_list | max %}
{% set min_viable_mtu_dataplane = mtu_dataplane_list | max %}
@ -45,11 +45,11 @@ network_config:
{% for network in role_networks if not network.startswith('Tenant') %}
- type: vlan
device: bond_api
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', role_networks_lower[network] ~ '_vlan_id') }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }}
addresses:
- ip_netmask: {{ lookup('vars', role_networks_lower[network] ~ '_ip') }}/{{ lookup('vars', role_networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', role_networks_lower[network] ~ '_host_routes') }}
- ip_netmask: {{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{% endfor %}
- type: ovs_bridge
name: {{ neutron_physical_bridge_name }}
@ -70,9 +70,9 @@ network_config:
{% for network in role_networks if network.startswith('Tenant') %}
- type: vlan
device: bond-data
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', role_networks_lower[network] ~ '_vlan_id') }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }}
addresses:
- ip_netmask: {{ lookup('vars', role_networks_lower[network] ~ '_ip') }}/{{ lookup('vars', role_networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', role_networks_lower[network] ~ '_host_routes') }}
- ip_netmask: {{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{%- endfor %}

+ 9
- 9
tripleo_ansible/roles/tripleo_network_config/templates/2_linux_bonds_vlans/2_linux_bonds_vlans_dpdk.j2 View File

@ -6,7 +6,7 @@
{% set mtu_list = [] %}
{{ mtu_list.append(lookup('vars', ctlplane_mtu)) }}
{% for network in role_networks %}
{{ mtu_list.append(lookup('vars', role_networks_lower[network] ~ '_mtu')) }}
{{ mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }}
{%- endfor %}
{% set min_viable_mtu = mtu_list | max %}
network_config:
@ -35,24 +35,24 @@ network_config:
{% for network in role_networks if not network.startswith('Tenant') %}
- type: vlan
device: bond_api
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', role_networks_lower[network] ~ '_vlan_id') }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }}
addresses:
- ip_netmask: {{ lookup('vars', role_networks_lower[network] ~ '_ip') }}/{{ lookup('vars', role_networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', role_networks_lower[network] ~ '_host_routes') }}
- ip_netmask: {{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{% endfor %}
{# Special config for OVS DPDK #}
- type: ovs_user_bridge
name: br-dpdk0
use_dhcp: false
{% for network in role_networks if network.startswith('Tenant') %}
ovs_extra: "set port br-dpdk0 tag={{ lookup('vars', role_networks_lower[network] ~ '_vlan_id') }}"
ovs_extra: "set port br-dpdk0 tag={{ lookup('vars', networks_lower[network] ~ '_vlan_id') }}"
addresses:
- ip_netmask: {{ lookup('vars', role_networks_lower[network] ~ '_ip') }}/{{ lookup('vars', role_networks_lower[network] ~ '_cidr')}}
- ip_netmask: {{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr')}}
{% if default_route_networks and network in default_route_networks %}
routes: {{ lookup('vars', role_networks_lower[network] ~ '_host_routes') + [{'default': true, 'next_hop': lookup('vars', role_networks_lower[network] ~ '_gateway_ip')}] }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') + [{'default': true, 'next_hop': lookup('vars', networks_lower[network] ~ '_gateway_ip')}] }}
{% else %}
routes: {{ lookup('vars', role_networks_lower[network] ~ '_host_routes') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{% endif %}
{%- endfor %}
members:


+ 5
- 5
tripleo_ansible/roles/tripleo_network_config/templates/bonds_vlans/bonds_vlans.j2 View File

@ -1,7 +1,7 @@
---
{% set mtu_list = [ctlplane_mtu] %}
{% for network in role_networks %}
{{ mtu_list.append(lookup('vars', role_networks_lower[network] ~ '_mtu')) }}
{{ mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }}
{%- endfor %}
{% set min_viable_mtu = mtu_list | max %}
network_config:
@ -31,9 +31,9 @@ network_config:
mtu: {{ min_viable_mtu }}
{% for network in role_networks %}
- type: vlan
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', role_networks_lower[network] ~ '_vlan_id') }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }}
addresses:
- ip_netmask: {{ lookup('vars', role_networks_lower[network] ~ '_ip') }}/{{ lookup('vars', role_networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', role_networks_lower[network] ~ '_host_routes') }}
- ip_netmask: {{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{%- endfor %}

+ 5
- 5
tripleo_ansible/roles/tripleo_network_config/templates/bonds_vlans/bonds_vlans_dpdk.j2 View File

@ -1,7 +1,7 @@
---
{% set mtu_list = [ctlplane_mtu] %}
{% for network in role_networks %}
{{ mtu_list.append(lookup('vars', role_networks_lower[network] ~ '_mtu')) }}
{{ mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }}
{%- endfor %}
{% set min_viable_mtu = mtu_list | max %}
network_config:
@ -29,11 +29,11 @@ network_config:
{% for network in role_networks %}
- type: vlan
device: bond_api
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', role_networks_lower[network] ~ '_vlan_id') }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }}
addresses:
- ip_netmask: {{ lookup('vars', role_networks_lower[network] ~ '_ip') }}/{{ lookup('vars', role_networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', role_networks_lower[network] ~ '_host_routes') }}
- ip_netmask: {{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{%- endfor %}
{# Used as a provider network with external DHCP #}
- type: ovs_user_bridge


+ 5
- 5
tripleo_ansible/roles/tripleo_network_config/templates/bonds_vlans/bonds_vlans_storage.j2 View File

@ -1,7 +1,7 @@
---
{% set mtu_list = [ctlplane_mtu] %}
{% for network in role_networks %}
{{ mtu_list.append(lookup('vars', role_networks_lower[network] ~ '_mtu')) }}
{{ mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }}
{%- endfor %}
{% set min_viable_mtu = mtu_list | max %}
network_config:
@ -31,9 +31,9 @@ network_config:
mtu: {{ min_viable_mtu }}
{% for network in role_networks %}
- type: vlan
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', role_networks_lower[network] ~ '_vlan_id') }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }}
addresses:
- ip_netmask: {{ lookup('vars', role_networks_lower[network] ~ '_ip') }}/{{ lookup('vars', role_networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', role_networks_lower[network] ~ '_host_routes') }}
- ip_netmask: {{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{%- endfor %}

+ 8
- 8
tripleo_ansible/roles/tripleo_network_config/templates/multiple_nics/multiple_nics.j2 View File

@ -13,30 +13,30 @@ network_config:
{% if network not in ["External", "Tenant"] %}
- type: interface
name: nic{{ loop.index +1 }}
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
use_dhcp: false
addresses:
- ip_netmask:
{{ lookup('vars', role_networks_lower[network] ~ '_ip') }}/{{ lookup('vars', role_networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', role_networks_lower[network] ~ '_host_routes') }}
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{% elif 'external_bridge' in role_tags %}
- type: ovs_bridge
{% if network == 'External' %}
name: {{ neutron_physical_bridge_name }}
{% else %}
name: {{ 'br-' ~ role_networks_lower[network] }}
name: {{ 'br-' ~ networks_lower[network] }}
{% endif %}
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
dns_servers: {{ ctlplane_dns_nameservers }}
use_dhcp: false
addresses:
- ip_netmask:
{{ lookup('vars', role_networks_lower[network] ~ '_ip') }}/{{ lookup('vars', role_networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', role_networks_lower[network] ~ '_host_routes') }}
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
members:
- type: interface
name: nic{{loop.index + 1}}
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
use_dhcp: false
primary: true
{% endif %}


+ 8
- 8
tripleo_ansible/roles/tripleo_network_config/templates/multiple_nics/multiple_nics_dpdk.j2 View File

@ -14,30 +14,30 @@ network_config:
{% if network not in ["External", "Tenant"] %}
- type: interface
name: nic{{ loop.index +1 }}
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
use_dhcp: false
addresses:
- ip_netmask:
{{ lookup('vars', role_networks_lower[network] ~ '_ip') }}/{{ lookup('vars', role_networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', role_networks_lower[network] ~ '_host_routes') }}
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{% elif 'external_bridge' in role_tags %}
- type: ovs_bridge
{% if network == 'External' %}
name: {{ neutron_physical_bridge_name }}
{% else %}
name: {{ 'br-' ~ role_networks_lower[network] }}
name: {{ 'br-' ~ networks_lower[network] }}
{% endif %}
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
dns_servers: {{ ctlplane_dns_nameservers }}
use_dhcp: false
addresses:
- ip_netmask:
{{ lookup('vars', role_networks_lower[network] ~ '_ip') }}/{{ lookup('vars', role_networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', role_networks_lower[network] ~ '_host_routes') }}
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
members:
- type: interface
name: nic{{loop.index + 1}}
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
use_dhcp: false
primary: true
{% endif %}


+ 12
- 12
tripleo_ansible/roles/tripleo_network_config/templates/multiple_nics_vlans/multiple_nics_vlans.j2 View File

@ -13,38 +13,38 @@ network_config:
{% if network not in ["External", "Tenant"] %}
- type: interface
name: nic{{ loop.index + 1 }}
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
use_dhcp: false
- type: vlan
device: nic{{ loop.index + 1 }}
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', role_networks_lower[network] ~ '_vlan_id') }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }}
addresses:
- ip_netmask:
{{ lookup('vars', role_networks_lower[network] ~ '_ip') }}/{{ lookup('vars', role_networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', role_networks_lower[network] ~ '_host_routes') }}
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{% elif 'external_bridge' in role_tags %}
- type: ovs_bridge
{% if network == 'External' %}
name: {{ neutron_physical_bridge_name }}
{% else %}
name: {{ 'br-' ~ role_networks_lower[network] }}
name: {{ 'br-' ~ networks_lower[network] }}
{% endif %}
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
dns_servers: {{ ctlplane_dns_nameservers }}
use_dhcp: false
members:
- type: interface
name: nic{{ loop.index + 1 }}
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
use_dhcp: false
primary: true
- type: vlan
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', role_networks_lower[network] ~ '_vlan_id') }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }}
addresses:
- ip_netmask:
{{ lookup('vars', role_networks_lower[network] ~ '_ip') }}/{{ lookup('vars', role_networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', role_networks_lower[network] ~ '_host_routes') }}
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{% endif %}
{% endfor %}

+ 12
- 12
tripleo_ansible/roles/tripleo_network_config/templates/multiple_nics_vlans/multiple_nics_vlans_dpdk.j2 View File

@ -14,39 +14,39 @@ network_config:
{% if network not in ["External", "Tenant"] %}
- type: interface
name: nic{{ loop.index + 1 }}
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
use_dhcp: false
- type: vlan
device: nic{{ loop.index + 1 }}
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', role_networks_lower[network] ~ '_vlan_id') }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }}
addresses:
- ip_netmask:
{{ lookup('vars', role_networks_lower[network] ~ '_ip') }}/{{ lookup('vars', role_networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', role_networks_lower[network] ~ '_host_routes') }}
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{% elif 'external_bridge' in role_tags %}
- type: ovs_bridge
{% if network == 'External' %}
name: {{ neutron_physical_bridge_name }}
{% else %}
name: {{ 'br-' ~ role_networks_lower[network] }}
name: {{ 'br-' ~ networks_lower[network] }}
{% endif %}
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
dns_servers: {{ ctlplane_dns_nameservers }}
use_dhcp: false
members:
- type: interface
name: nic{{ loop.index + 1 }}
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
use_dhcp: false
primary: true
- type: vlan
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', role_networks_lower[network] ~ '_vlan_id') }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }}
addresses:
- ip_netmask:
{{ lookup('vars', role_networks_lower[network] ~ '_ip') }}/{{ lookup('vars', role_networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', role_networks_lower[network] ~ '_host_routes') }}
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{% endif %}
{% set _ = nics_used.append(loop.index) %}
{% endfor %}


+ 5
- 5
tripleo_ansible/roles/tripleo_network_config/templates/single_nic_linux_bridge_vlans/single_nic_linux_bridge_vlans.j2 View File

@ -1,7 +1,7 @@
---
{% set mtu_list = [ctlplane_mtu] %}
{% for network in role_networks %}
{{ mtu_list.append(lookup('vars', role_networks_lower[network] ~ '_mtu')) }}
{{ mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }}
{%- endfor %}
{% set min_viable_mtu = mtu_list | max %}
network_config:
@ -22,11 +22,11 @@ network_config:
primary: true
{% for network in role_networks if network not in networks_skip_config %}
- type: vlan
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', role_networks_lower[network] ~ '_vlan_id') }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }}
device: {{ neutron_physical_bridge_name }}
addresses:
- ip_netmask:
{{ lookup('vars', role_networks_lower[network] ~ '_ip') }}/{{ lookup('vars', role_networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', role_networks_lower[network] ~ '_host_routes') }}
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{% endfor %}

+ 5
- 5
tripleo_ansible/roles/tripleo_network_config/templates/single_nic_linux_bridge_vlans/single_nic_linux_bridge_vlans_storage.j2 View File

@ -1,7 +1,7 @@
---
{% set mtu_list = [ctlplane_mtu] %}
{% for network in role_networks %}
{{ mtu_list.append(lookup('vars', role_networks_lower[network] ~ '_mtu')) }}
{{ mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }}
{%- endfor %}
{% set min_viable_mtu = mtu_list | max %}
network_config:
@ -22,11 +22,11 @@ network_config:
primary: true
{% for network in role_networks if network not in networks_skip_config) %}
- type: vlan
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', role_networks_lower[network] ~ '_vlan_id') }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }}
device: br-storage
addresses:
- ip_netmask:
{{ lookup('vars', role_networks_lower[network] ~ '_ip') }}/{{ lookup('vars', role_networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', role_networks_lower[network] ~ '_host_routes') }}
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{% endfor %}

+ 5
- 5
tripleo_ansible/roles/tripleo_network_config/templates/single_nic_vlans/controller_no_external.j2 View File

@ -1,7 +1,7 @@
---
{% set mtu_list = [ctlplane_mtu] %}
{% for network in role_networks %}
{{ mtu_list.append(lookup('vars', role_networks_lower[network] ~ '_mtu')) }}
{{ mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }}
{%- endfor %}
{% set min_viable_mtu = mtu_list | max %}
network_config:
@ -22,10 +22,10 @@ network_config:
primary: true
{% for network in role_networks if network != 'External' %}
- type: vlan
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', role_networks_lower[network] ~ '_vlan_id') }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }}
addresses:
- ip_netmask:
{{ lookup('vars', role_networks_lower[network] ~ '_ip') }}/{{ lookup('vars', role_networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', role_networks_lower[network] ~ '_host_routes') }}
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{% endfor %}

+ 5
- 5
tripleo_ansible/roles/tripleo_network_config/templates/single_nic_vlans/single_nic_vlans.j2 View File

@ -1,7 +1,7 @@
---
{% set mtu_list = [ctlplane_mtu] %}
{% for network in role_networks %}
{{ mtu_list.append(lookup('vars', role_networks_lower[network] ~ '_mtu')) }}
{{ mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }}
{%- endfor %}
{% set min_viable_mtu = mtu_list | max %}
network_config:
@ -22,10 +22,10 @@ network_config:
primary: true
{% for network in role_networks %}
- type: vlan
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', role_networks_lower[network] ~ '_vlan_id') }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }}
addresses:
- ip_netmask:
{{ lookup('vars', role_networks_lower[network] ~ '_ip') }}/{{ lookup('vars', role_networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', role_networks_lower[network] ~ '_host_routes') }}
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{% endfor %}

+ 5
- 5
tripleo_ansible/roles/tripleo_network_config/templates/single_nic_vlans/single_nic_vlans_storage.j2 View File

@ -1,7 +1,7 @@
---
{% set mtu_list = [ctlplane_mtu] %}
{% for network in role_networks %}
{{ mtu_list.append(lookup('vars', role_networks_lower[network] ~ '_mtu')) }}
{{ mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }}
{%- endfor %}
{% set min_viable_mtu = mtu_list | max %}
network_config:
@ -22,10 +22,10 @@ network_config:
primary: true
{% for network in role_networks %}
- type: vlan
mtu: {{ lookup('vars', role_networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', role_networks_lower[network] ~ '_vlan_id') }}
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }}
addresses:
- ip_netmask:
{{ lookup('vars', role_networks_lower[network] ~ '_ip') }}/{{ lookup('vars', role_networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', role_networks_lower[network] ~ '_host_routes') }}
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{% endfor %}

Loading…
Cancel
Save