diff --git a/netsim/ansible/templates/initial/linux/ubuntu.j2 b/netsim/ansible/templates/initial/linux/ubuntu.j2 index e57a046c4..9dfe80864 100644 --- a/netsim/ansible/templates/initial/linux/ubuntu.j2 +++ b/netsim/ansible/templates/initial/linux/ubuntu.j2 @@ -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 %} @@ -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 %}