Add prefix string to groups and hostvars output by nb_inventory plugin#984
Open
h3po wants to merge 6 commits intonetbox-community:develfrom
Open
Add prefix string to groups and hostvars output by nb_inventory plugin#984h3po wants to merge 6 commits intonetbox-community:develfrom
h3po wants to merge 6 commits intonetbox-community:develfrom
Conversation
Author
|
@sc68cal you requested that i open this pull request to have it ci tested, but the pipeline failed due to unrelated issues. I don't know how to retrigger it |
Contributor
|
I tried browsing around for a way to re-run the checks, but couldn't find it. Since this PR is outdated, please merge from master and re-push, and that will re-trigger |
Author
|
I corrected a mistake in the PR description above: the options are boolean parameters, adding a fixed prefix of "netbox_". Not string parameters. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue
#959
New Behavior
Adds new boolean parameters group_names_prefix and host_vars_prefix to the inventory plugin to add the string prefix "netbox_" to group names and hostvars, so for example "role_switch" becomes "netbox_role_switch" and "primary_ipv4" becomes "netbox_primary_ipv4".
Contrast to Current Behavior
Currently the inventory plugin does not prefix its group and hostvars names, potentially creating name collisions when used in conjunction with static inventory
Discussion: Benefits and Drawbacks
Benefit: Users can optionally enable the prefix. By having it disabled by default, the change is backwards compatible with existing configs.
Drawbacks: None
Changes to the Documentation
Documentation for the new parameters are included in the PR.
Proposed Release Note Entry
Added parameters group_names_prefix and host_vars_prefix to the inventory plugin
Double Check
develbranch.I have read the contributing guidelines, but unit tests are currently missing, as I can not get them to run locally. @sc68cal told me to create a pull request anyway.