Skip to content

Commit 7cb1589

Browse files
authored
For ansible-modules #835 : Add example of exclusion search (#837)
1 parent 2a62edc commit 7cb1589

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

plugins/inventory/nb_inventory.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,11 @@
248248
- role: network-edge-router
249249
device_query_filters:
250250
- has_primary_ip: 'true'
251+
- tenant__n: internal
251252
252253
# has_primary_ip is a useful way to filter out patch panels and other passive devices
254+
# Adding '__n' to a field searches for the negation of the value.
255+
# The above searches for devices that are NOT "tenant = internal"
253256
254257
# Query filters are passed directly as an argument to the fetching queries.
255258
# You can repeat tags in the query string.

0 commit comments

Comments
 (0)