Advertisement
gyokiss

2_linux_bonds_vlans.j2 original

Mar 4th, 2021
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. ---
  2. {% set mtu_ctlplane_list = [ctlplane_mtu] %}
  3. {% set mtu_dataplane_list = [] %}
  4. {% for network in role_networks %}
  5. {# This block resolves the minimum viable MTU for interfaces connected to #}
  6. {# the dataplane network(s), which start by "Tenant", and also bonds #}
  7. {# and bridges that carry multiple VLANs. Each VLAN may have different MTU. #}
  8. {# The bridge, bond or interface must have an MTU to allow the VLAN with the #}
  9. {# largest MTU. #}
  10. {% if network.startswith('Tenant') %}
  11. {{ mtu_dataplane_list.append(lookup('vars', role_networks_lower[network] ~ '_mtu')) }}
  12. {# This block resolves the minimum viable MTU for interfaces connected to #}
  13. {# the control plane network(s) (don't start by "Tenant"), and also bonds #}
  14. {# and bridges that carry multiple VLANs. Each VLAN may have different MTU. #}
  15. {# The bridge, bond or interface must have an MTU to allow the VLAN with the #}
  16. {# largest MTU. #}
  17. {% else %}
  18. {{ mtu_ctlplane_list.append(lookup('vars', role_networks_lower[network] ~ '_mtu')) }}
  19. {%- endfor %}
  20. {% set min_viable_mtu_ctlplane = mtu_ctlplane_list | max %}
  21. {% set min_viable_mtu_dataplane = mtu_dataplane_list | max %}
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement