Don't put interfaces with no settings into the configuration

netbox
Daniel Ankers 2024-07-05 13:49:44 +01:00
parent a89fea37a9
commit 8fc40e6c19
1 changed files with 2 additions and 0 deletions

View File

@ -113,6 +113,7 @@ chassis {
{% macro interfaceconfig(interface,rack = None) %}
{% if not (interface.name.contains('-')) or interface.name or interface.description or interface.lag or interface.ip_addresses.count() or interface.connected_endpoints or interface.mode or interface.tagged_vlans or interface.untagged_vlan %}
{{ interface.name }} {
{% if interface.description != '' %}
description "{{ interface.description }}";
@ -195,6 +196,7 @@ chassis {
{% endif %}
{% endif %}
}
{% endif %}
{%- endmacro %}
{% macro interfacesection(device,vlans) %}