fabric: fix check for peer switch
This commit is contained in:
parent
65c16dbc63
commit
5381fecaa4
|
@ -12,7 +12,7 @@ iface {{ bond.name }}
|
||||||
{% endif %}
|
{% 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 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
|
{% set peer_members = hostvars[peer].interfaces
|
||||||
| selectattr('lag') | selectattr('lag.name', '==', bond.name) %}
|
| selectattr('lag') | selectattr('lag.name', '==', bond.name) %}
|
||||||
{% if peer_members | iface_peer | reject('eq', inventory_hostname) %}
|
{% if peer_members | iface_peer | reject('eq', inventory_hostname) %}
|
||||||
|
|
Loading…
Reference in a new issue