From b02ebf5be3734df2c0934162baf5cea484c26da9 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Tue, 7 Jan 2025 10:53:17 +0100 Subject: [PATCH] templates: skip FC interfaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Anything that has the WWN attribute set really. This won’t work for VMs because this attribute is not returned for those. --- templates/ansible.intf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/ansible.intf.j2 b/templates/ansible.intf.j2 index 175bb57..3e9a663 100644 --- a/templates/ansible.intf.j2 +++ b/templates/ansible.intf.j2 @@ -7,7 +7,7 @@ iface {{ vrf }} {%+ endfor %} -{%- for iface in interfaces | selectattr('enabled') %} +{%- for iface in interfaces | selectattr('enabled') | rejectattr('wwn') %} {% if iface.mgmt_only is not defined or not iface.mgmt_only %} auto {{ iface.name }} iface {{ iface.name }}{% if iface.name == 'lo' %} inet loopback{% endif +%}