fabric: add custom field on dcim.Interface for bond mode
This commit is contained in:
parent
ce7c1bd49e
commit
dbc00fd448
|
@ -13,6 +13,9 @@ iface {{ iface.name }}
|
|||
{#- Bond/MLAG stuff. #}
|
||||
{% set members = interfaces | selectattr('lag') | selectattr('lag.name', '==', iface.name) %}
|
||||
bond-slaves {{ members | map(attribute='name') | join(' ') }}
|
||||
{% if iface.custom_fields.bond_mode %}
|
||||
bond-mode {{ iface.custom_fields.bond_mode }}
|
||||
{% 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 is defined %}
|
||||
{% set peer_members = hostvars[peer].interfaces | selectattr('lag') | selectattr('lag.name', '==', iface.name) %}
|
||||
|
|
Loading…
Reference in a new issue