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

Add action_groups #59

Merged
merged 1 commit into from
Aug 15, 2024
Merged

Conversation

mariolenz
Copy link
Collaborator

@mariolenz mariolenz commented Aug 14, 2024

SUMMARY

I think we should implement an action group since this can be quite useful. I guess sooner or later someone will open a feature request for this, anyway.

amazon.aws and community.aws seem to share the action group aws. I suggest the same here: community.vmware already uses vmware, so let's also use it here.

Additionally, we might consider renaming the action group of the modules in vmware.vmware_rest from vmware_rest to vmware, but this is off-topic here. Just wanted to mention it as an idea.

If you think it would be better to not share action groups between those collections, that's also fine for me. The important thing is to have one in order to allow people to use module defaults. If you think it would be better to have a unique name for the action group, it would be great if you could suggest one.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

meta/runtime.yml

ADDITIONAL INFORMATION

ansible-collections/vmware.vmware_rest#440

@mikemorency
Copy link
Collaborator

im not familiar with action_groups. I read this but i still dont get it. What are they doing?

@mariolenz
Copy link
Collaborator Author

The modules in this collection have a lot of common parameters / options like hostname, username and password. If you have several tasks using those modules you can specify that they're always the same. This a voids boilerplate / copy& paste because you can say "if you run a module from this group always use this parameters". I think you can overwrite them in any task, though.

Module defaults groups mentions this as a feature preview, but I think it should be stable by now and the documentation is simply outdated.

Copy link
Collaborator

@mikemorency mikemorency left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is pretty cool, i think its a good addition

@mariolenz
Copy link
Collaborator Author

Thanks for reviewing @mikemorency!

@mariolenz mariolenz merged commit 78639d3 into ansible-collections:main Aug 15, 2024
10 checks passed
@mariolenz mariolenz deleted the action_groups branch August 15, 2024 16:12
@bardielle
Copy link
Collaborator

@mariolenz thanks for your contribution

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.

3 participants