Add action_group to enable module defaults groups #800
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
#799
New Behavior
This enables support for the module defaults groups feature introduced in ansible-core 2.12. Using module defaults groups one can provide default values (e.g. token, url, etc.) for a group of modules instead of having to specify them for every used module. For more details see: https://docs.ansible.com/ansible/latest/user_guide/playbooks_module_defaults.html#module-defaults-groups
This commit adds all modules available in this collection to an action group called 'netbox'. This change is backwards compatible. Older versions of Ansible just ignore this.
Contrast to Current Behavior
Currently, user has to specify module defaults (e.g. url, token) for every module in use.
Discussion: Benefits and Drawbacks
This change potentially reduces the amount of boilerplate code using this collection as required parameters like e.g.
url
ortoken
need to be provided once and can be specified in a central place.Changes to the Documentation
Might add a hint to the documentation about the usage of this feature.
Proposed Release Note Entry
Support module defaults groups
Double Check
devel
branch.