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 group for keycloak #9284

Merged
merged 5 commits into from
Dec 23, 2024

Conversation

cnorthwood
Copy link
Contributor

SUMMARY

Add an action group for all the keycloak modules. This will allows keycloak authentication details to be set as a module_defaults rather than repeated on each task

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

keycloak

ADDITIONAL INFORMATION

This will allows keycloak authentication details to be set as a module_defaults rather than repeated on each task
@ansibullbot ansibullbot added feature This issue/PR relates to a feature request new_contributor Help guide this first time contributor labels Dec 19, 2024
@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-10 Automatically create a backport for the stable-10 branch labels Dec 20, 2024
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! Please add a changelog fragment.

Also please add a documentation fragment to plugins/doc_fragments/keycloak.py, similar to ACTIONGROUP_PROXMOX in plugins/doc_fragments/proxmox.py, and use it in the modules by updating extends_documentation_fragment and attributes as follows:

extends_documentation_fragment:
  - community.general.keycloak.actiongroup_keycloak
attributes:
  action_group:
    version_added: 11.0.0

@felixfontein felixfontein changed the title Create group for keycloak Add action group for keycloak Dec 20, 2024
@ansibullbot ansibullbot added docs_fragments docs_fragments plugin (shared docs) module module plugins plugin (any type) labels Dec 21, 2024
@ansibullbot

This comment was marked as outdated.

@ansibullbot ansibullbot added ci_verified Push fixes to PR branch to re-run CI needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Dec 21, 2024
plugins/modules/keycloak_authentication.py Outdated Show resolved Hide resolved
extends_documentation_fragment:
- community.general.keycloak.actiongroup_keycloak
- community.general.attributes
- community.general.attributes.info_module
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm, this module is exceptional in that it does not use the docs fragment and the argument spec from the module utils. Basically it only has the auth_keycloak_url and validate_certs options that are shared by the other modules. For that reason it should probably be excluded from the action group, since otherwise you cannot use the action group when using this module (except for these two options, but not for all other shared ones).

It's probably best to skip it here, and once someone makes the module use the module utils' argument spec and docs fragment, to then also add it to the action group.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch, excluded this one now

@ansibullbot ansibullbot removed the ci_verified Push fixes to PR branch to re-run CI label Dec 23, 2024
@ansibullbot

This comment was marked as outdated.

@ansibullbot ansibullbot added the ci_verified Push fixes to PR branch to re-run CI label Dec 23, 2024
@ansibullbot ansibullbot removed ci_verified Push fixes to PR branch to re-run CI needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Dec 23, 2024
@felixfontein felixfontein merged commit 28f36ae into ansible-collections:main Dec 23, 2024
129 checks passed
Copy link

patchback bot commented Dec 23, 2024

Backport to stable-10: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-10/28f36ae25c233d294e266c250e8cf34e02445857/pr-9284

Backported as #9340

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Dec 23, 2024
patchback bot pushed a commit that referenced this pull request Dec 23, 2024
* Create group for keycloak

This will allows keycloak authentication details to be set as a module_defaults rather than repeated on each task

* add documentation to keycloak modules to note creation of action_group

* add changelog for keycloak action_group creation

* exclude keycloak_realm_info from action group, as it does not share same set of base parameters

* fix formatting on changelog entry for adding Keycloak action group

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 28f36ae)
@felixfontein
Copy link
Collaborator

@cnorthwood thanks for your contribution!

felixfontein added a commit to felixfontein/community.general that referenced this pull request Dec 23, 2024
felixfontein pushed a commit that referenced this pull request Dec 23, 2024
…#9340)

Add action group for keycloak (#9284)

* Create group for keycloak

This will allows keycloak authentication details to be set as a module_defaults rather than repeated on each task

* add documentation to keycloak modules to note creation of action_group

* add changelog for keycloak action_group creation

* exclude keycloak_realm_info from action group, as it does not share same set of base parameters

* fix formatting on changelog entry for adding Keycloak action group

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 28f36ae)

Co-authored-by: Chris Northwood <cnorthwood@users.noreply.github.com>
felixfontein added a commit that referenced this pull request Dec 23, 2024
* Add sanity test for action groups.

* Fix interpolation.

* Fix message.

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Improve regex.

* Add entry for new 'keycloak' action group.

Ref: #9284

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
patchback bot pushed a commit that referenced this pull request Dec 23, 2024
* Add sanity test for action groups.

* Fix interpolation.

* Fix message.

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Improve regex.

* Add entry for new 'keycloak' action group.

Ref: #9284

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit d5237ee)
felixfontein added a commit that referenced this pull request Dec 23, 2024
…oups (#9343)

Add sanity test for action groups (#9294)

* Add sanity test for action groups.

* Fix interpolation.

* Fix message.

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Improve regex.

* Add entry for new 'keycloak' action group.

Ref: #9284

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit d5237ee)

Co-authored-by: Felix Fontein <felix@fontein.de>
Massl123 pushed a commit to Massl123/community.general that referenced this pull request Feb 7, 2025
* Create group for keycloak

This will allows keycloak authentication details to be set as a module_defaults rather than repeated on each task

* add documentation to keycloak modules to note creation of action_group

* add changelog for keycloak action_group creation

* exclude keycloak_realm_info from action group, as it does not share same set of base parameters

* fix formatting on changelog entry for adding Keycloak action group

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
Massl123 pushed a commit to Massl123/community.general that referenced this pull request Feb 7, 2025
* Add sanity test for action groups.

* Fix interpolation.

* Fix message.

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Improve regex.

* Add entry for new 'keycloak' action group.

Ref: ansible-collections#9284

---------

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-10 Automatically create a backport for the stable-10 branch docs_fragments docs_fragments plugin (shared docs) feature This issue/PR relates to a feature request module module new_contributor Help guide this first time contributor plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants