fabric: don’t set bond slaves if there are none
Not that that should happen except by mistake.
This commit is contained in:
parent
be0cc49b33
commit
a97d133873
|
@ -12,7 +12,9 @@ iface {{ iface.name }}
|
|||
{% if iface.type.value == 'lag' %}
|
||||
{#- Bond/MLAG stuff. #}
|
||||
{% set members = interfaces | selectattr('lag') | selectattr('lag.name', '==', iface.name) %}
|
||||
{% if members %}
|
||||
bond-slaves {{ members | map(attribute='name') | join(' ') }}
|
||||
{% endif %}
|
||||
{% if iface.custom_fields.bond_mode %}
|
||||
bond-mode {{ iface.custom_fields.bond_mode }}
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in a new issue