diff --git a/inventory.yml b/inventory.yml index 61cc7d4..002535c 100644 --- a/inventory.yml +++ b/inventory.yml @@ -1,11 +1,11 @@ plugin: netbox.netbox.nb_inventory -fetch_all: no -interfaces: yes +interfaces: true +config_context: true +flatten_config_context: true +flatten_custom_fields: true +flatten_local_context_data: true +fetch_all: false plurals: false -group_by: - - location - - rack - - tag device_query_filters: - has_primary_ip: true query_filters: diff --git a/roles/debian/templates/frr.conf.j2 b/roles/debian/templates/frr.conf.j2 index 7c79400..7f3413c 100644 --- a/roles/debian/templates/frr.conf.j2 +++ b/roles/debian/templates/frr.conf.j2 @@ -2,14 +2,14 @@ frr defaults datacenter service integrated-vtysh-config log syslog -router bgp {{ hostvars[inventory_hostname].custom_fields.asn.asn }} +router bgp {{ asn.asn }} bgp bestpath as-path multipath-relax neighbor fabric peer-group neighbor fabric remote-as external neighbor fabric capability extended-nexthop -{% for iface in hostvars[inventory_hostname].interfaces | selectattr('name', 'match', '^lan') %} +{% for iface in interfaces | selectattr('name', 'match', '^lan') %} neighbor {{ iface.name }} interface peer-group fabric neighbor {{ iface.name }} bfd {% endfor %}