Netbox Inventory "not include tag"

Hi,

i ve a working Netbox Inventory with query_filters.
It looks like

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

1 Like

Is there really no way to exclude a tag

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?

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 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?

2 Likes

Thanks a lot,

I have not seen it

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