Skip to content

Commit

Permalink
Ubuntu: Fix lag.ifindex matching (#1736)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbemmel authored Jan 3, 2025
1 parent 23a04a9 commit 1840436
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions netsim/ansible/templates/initial/linux/ubuntu.j2
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ network:
ethernets:
{% if l.type in ['lag','bond'] %}
{% if l.type=='lag' %}
{% for i in interfaces if i.lag._parentindex|default(0)==l.linkindex %}
{% for i in interfaces if i.lag._parentindex|default(0)==l.lag.ifindex %}
{{ i.ifname }}:
dhcp4: no
{% endfor %}
Expand All @@ -138,7 +138,7 @@ network:
{{ l.ifname }}:
interfaces:
{% if l.type=='lag' %}
{% for i in interfaces if i.lag._parentindex|default(0)==l.linkindex %}
{% for i in interfaces if i.lag._parentindex|default(0)==l.lag.ifindex %}
- {{ i.ifname }}
{% endfor %}
{% elif l.bonding.members is defined %}
Expand Down

0 comments on commit 1840436

Please sign in to comment.