Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes graphql inventory grouping by tags #228

Merged
merged 1 commit into from
Aug 14, 2023

Conversation

joewesch
Copy link
Contributor

Fixes: #225

@jvanderaa jvanderaa merged commit 6fd0583 into nautobot:develop Aug 14, 2023
@noesberger
Copy link

Hi
I just had the same problem with multiple tags not working and seen that in version 4.5.0 this fix is already in. Thanks.

But the group_names have the prefix tags_ added. For our environment this is not ideal, because then we have to change all our already defined group_vars. The "normal" inventory plugin is not adding a suffix to the group names.
Can this prefix be removed are maybe add a parameter that this can be configured.

if tag.get(tag_attr):
    group_name = f"tags_{tag[tag_attr]}"

@joewesch
Copy link
Contributor Author

Hello @noesberger, the standard inventory module does indeed prefix tags_ to the group name. That's actually where I got the logic from.

That being said, there is an option in the standard inventory module called group_names_raw that I did not replicate that would have provided you with a non-prefixed version. If you would like this feature added to the gql_inventory module as well please open an issue and we will get to it in due time. We also do accept PRs if you want to contribute the change yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GraphQL Inventory doesn't support group_by tags
3 participants