diff --git a/roles/fabric/templates/bond.intf.j2 b/roles/fabric/templates/bond.intf.j2 index 0c87d0b..46a9bb0 100644 --- a/roles/fabric/templates/bond.intf.j2 +++ b/roles/fabric/templates/bond.intf.j2 @@ -12,7 +12,7 @@ iface {{ bond.name }} {% endif %} {#- If the peer shares a bond with the same name, generate a clag-id for it unless the bonded link is to peer itself. #} -{% if peer %} +{% if peer is defined %} {% set peer_members = hostvars[peer].interfaces | selectattr('lag') | selectattr('lag.name', '==', bond.name) %} {% if peer_members | iface_peer | reject('eq', inventory_hostname) %}