# Netbox Inventory "not include tag"

**URL:** <https://forum.ansible.com/t/netbox-inventory-not-include-tag/7947>\
**Category:** Get Help\
**Tags:** netbox\
**Created:** [August 19, 2024, 2:21pm UTC](https://forum.ansible.com/t/netbox-inventory-not-include-tag/7947 "2024-08-19T14:21:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shb256](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/shb256/32/2535_2.png) [@shb256](https://forum.ansible.com/u/shb256)\
**Post date:** [August 19, 2024, 2:21pm UTC](https://forum.ansible.com/t/netbox-inventory-not-include-tag/7947/1 "2024-08-19T14:21:19Z")

</div>

Hi,

i ve a working Netbox Inventory with query\_filters.  
It looks like

```auto
query_filters:
  - tag: update-daily
  - platform: debian

```

and now I like to extend the query that every host is excluded with the tag no-updates  
is this possible?

thanks a lot

---

<div class="post-metadata">

**Author:** ![shb256](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/shb256/32/2535_2.png) [@shb256](https://forum.ansible.com/u/shb256)\
**Post date:** [August 24, 2024, 11:57am UTC](https://forum.ansible.com/t/netbox-inventory-not-include-tag/7947/2 "2024-08-24T11:57:10Z")

</div>

Is there really no way to exclude a tag

---

<div class="post-metadata">

**Author:** ![anon81884396](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@anon81884396](https://forum.ansible.com/u/anon81884396)\
**Post date:** [August 24, 2024, 12:48pm UTC](https://forum.ansible.com/t/netbox-inventory-not-include-tag/7947/3 "2024-08-24T12:48:51Z")

</div>

I haven’t used this module or heard of Netbox until your post. I’d normally omit offering any sort of advice based on not having personal experience, but it seems like you’re getting frustrated that nobody is replying.

You haven’t written information about things you’ve tried to get it to work, maybe having your tag prefaced with ! will make the query into a NOT operator?

```auto
query_filters:
  - tag: update-daily
  - tag: !no-updates
  - platform: debian

```

Just throwing an idea out there for ya, no clue if it works like this. Worth a shot.

Edit: actually, looking at [netbox.netbox.nb\_inventory inventory – NetBox inventory source — Ansible Community Documentation](https://docs.ansible.com/ansible/latest/collections/netbox/netbox/nb_inventory_inventory.html) it mentions `# The above searches for devices that are NOT "tenant = internal"` for `- tenant __n: internal` so maybe you’d do `- tag__ n: no-updates`?

---

<div class="post-metadata">

**Author:** ![shb256](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/shb256/32/2535_2.png) [@shb256](https://forum.ansible.com/u/shb256)\
**Post date:** [August 29, 2024, 6:46am UTC](https://forum.ansible.com/t/netbox-inventory-not-include-tag/7947/4 "2024-08-29T06:46:43Z")

</div>

Thanks a lot,

I have not seen it

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [September 28, 2024, 6:47am UTC](https://forum.ansible.com/t/netbox-inventory-not-include-tag/7947/5 "2024-09-28T06:47:02Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
