Skip to content

Commit

Permalink
Ubuntu: Fix interface type in case of bond
Browse files Browse the repository at this point in the history
  • Loading branch information
jbemmel authored Jan 3, 2025
1 parent 8128904 commit fe727fc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion netsim/ansible/templates/initial/linux/ubuntu.j2
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,14 @@ cat <<SCRIPT > /etc/netplan/04-routes.yaml
network:
version: 2
renderer: networkd
ethernets:
{% for intf in routing.static|map(attribute='nexthop.intf',default='')|unique if intf %}
{% if loop.first %}
{% if 'bond' in intf %}
bonds:
{% else %}
ethernets:
{% endif %}
{% endif %}
{{ intf }}:
routes:
{% for sr_entry in routing.static|default([]) if sr_entry.nexthop.intf|default('') == intf %}
Expand Down

0 comments on commit fe727fc

Please sign in to comment.