# Keycloak modules in community.general

**URL:** <https://forum.ansible.com/t/keycloak-modules-in-community-general/41746>\
**Category:** Project Discussions\
**Tags:** middleware, keycloak, community-general, awx\
**Created:** [April 15, 2025, 5:30pm UTC](https://forum.ansible.com/t/keycloak-modules-in-community-general/41746 "2025-04-15T17:30:49Z")\
**Posts on this page:** 18\
**Page:** 2

<div class="post-metadata">

**Author:** ![hcherukuri](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/hcherukuri/32/2877_2.png) [@hcherukuri](https://forum.ansible.com/u/hcherukuri)\
**Post date:** [April 20, 2026, 5:49am UTC](https://forum.ansible.com/t/keycloak-modules-in-community-general/41746/21 "2026-04-20T05:49:19Z")

</div>

Hello,

We currently have 31 Keycloak-related modules in **community.general**. The **keycloak collection** already includes four modules `keycloak_client`, `keycloak_realm`, `keycloak_role`, and `keycloak_user_federation`.

My proposal is to migrate the remaining modules incrementally, moving them one by one and adding the relevant **Molecule tests** for each module as part of the process. To keep things organized, I’ve grouped them by functional area:

Group Modules

| Group | Modules |
| --- | --- |
| Directory & Access | `keycloak_user`, `keycloak_group`, `keycloak_identity_provider`, `keycloak_user_rolemapping`, `keycloak_realm_rolemapping`, `keycloak_user_execute_actions_email`, `keycloak_userprofile` |
| Client Extras | `keycloak_clientscope`, `keycloak_clientscope_type`, `keycloak_clientsecret_info`, `keycloak_clientsecret_regenerate`, `keycloak_clienttemplate`, `keycloak_client_rolemapping`, `keycloak_client_rolescope` |
| Realm Metadata & Keys | `keycloak_realm_info`, `keycloak_realm_keys_metadata_info`, `keycloak_realm_key`, `keycloak_realm_localization` |
| Components | `keycloak_component`, `keycloak_component_info` |
| Authentication | `keycloak_authentication_required_actions`, `keycloak_authentication`, `keycloak_authentication_v2` |
| Authorization | `keycloak_authz_authorization_scope`, `keycloak_authz_permission`, `keycloak_authz_permission_info`, `keycloak_authz_custom_policy` |

The plan would be to submit PRs to the keycloak collection, and once merged, redirect users to consume these modules directly from the collection. I’d like to hear your thoughts!

Thanks,  
Harsha

---

<div class="post-metadata">

**Author:** ![russoz](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/russoz/32/127_2.png) [@russoz](https://forum.ansible.com/u/russoz)\
**Post date:** [April 24, 2026, 5:41am UTC](https://forum.ansible.com/t/keycloak-modules-in-community-general/41746/22 "2026-04-24T05:41:24Z")

</div>

Hi @hcherukuri ,

I am happy that there is a plan, based on the actual artefacts. However, I am concerned about this “one-by-one” approach and how long it will take. I reckon it could, likely, produce a situation where users will need to install both collections to use a module from CG and another from the KC collection.

The redirections help to mitigate the issue, but nonetheless, my _personal preference_ would be to migrate to the new collection straight away.

Just my $0.02

PS: As a disclaimer, I am not an user of these modules, so take my opinion with a sizable grain of salt.

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [April 25, 2026, 2:46pm UTC](https://forum.ansible.com/t/keycloak-modules-in-community-general/41746/23 "2026-04-25T14:46:22Z")

</div>

I agree with @russoz, it would be a lot easier for us and users if the migration would happen in one go. On the other hand, assuming the migration will take \< 6 months, this won’t be a problem anyway since there won’t be another major c.g release between in \< 4 weeks (it’s unlikely that until then we will remove anything) and in ~6 months. So from user’s point of view, nothing will be removed. (We could also just keep the modules around and only deprecate them, and only do the removal right before the major release in winter. That way it’s easier to add bugfixes, which we’d require to first go into the new location until they are backported, and once the new collection has a release with a module included we can deprecate a module.)

Also note that contributors are still actively working on existing and new keycloak modules ([Pull requests · ansible-collections/community.general · GitHub](https://github.com/ansible-collections/community.general/pulls?q=is%3Apr+is%3Aopen+keycloak)).

---

<div class="post-metadata">

**Author:** ![hcherukuri](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/hcherukuri/32/2877_2.png) [@hcherukuri](https://forum.ansible.com/u/hcherukuri)\
**Post date:** [April 28, 2026, 1:56pm UTC](https://forum.ansible.com/t/keycloak-modules-in-community-general/41746/24 "2026-04-28T13:56:18Z")

</div>

Thanks for the feedback. I will work moving then all at once. Once I have it ready will reach you out for review.

---

<div class="post-metadata">

**Author:** ![russoz](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/russoz/32/127_2.png) [@russoz](https://forum.ansible.com/u/russoz)\
**Post date:** [May 1, 2026, 1:34am UTC](https://forum.ansible.com/t/keycloak-modules-in-community-general/41746/25 "2026-05-01T01:34:06Z")

</div>

Hi @hcherukuri

One other thing, still around this topic: we have a [number of issues](https://github.com/ansible-collections/community.general/issues?q=is%3Aissue%20state%3Aopen%20keycloak), and more important, active [pull requests](https://github.com/ansible-collections/community.general/pulls?q=is%3Apr+keycloak+is%3Aopen), including for the inclusion of new modules, all related to Keycloak.

I would suggest you tag along those existing issues and PRs, for a number of reasons:

1. to be in touch with KC users - future users modules/plugins in the KC collection
2. to start mentoring/growing/training future maintainers, so you can share the burden down the road
3. in case you are not doing that already, to see first hand the nitty gritty details of the problems that will haunt you 🙂

WDYT?

---

<div class="post-metadata">

**Author:** ![hcherukuri](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/hcherukuri/32/2877_2.png) [@hcherukuri](https://forum.ansible.com/u/hcherukuri)\
**Post date:** [May 28, 2026, 1:05am UTC](https://forum.ansible.com/t/keycloak-modules-in-community-general/41746/26 "2026-05-28T01:05:05Z")

</div>

Hello, I have created a PR with all the modules. Please take a look and provide your feedback [Migrate Keycloak modules from the community.general collection to Keycloak collection. by hcherukuri · Pull Request #341 · ansible-middleware/keycloak · GitHub](https://github.com/ansible-middleware/keycloak/pull/341)

---

<div class="post-metadata">

**Author:** ![russoz](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/russoz/32/127_2.png) [@russoz](https://forum.ansible.com/u/russoz)\
**Post date:** [May 29, 2026, 9:31pm UTC](https://forum.ansible.com/t/keycloak-modules-in-community-general/41746/27 "2026-05-29T21:31:00Z")

</div>

Hi @hcherukuri

I have reviewed (rather quickly and not deeply) the PR. Overall it looks good, though I left a recommendation on the versioning being mentioned in the docs. And as I write this, it occurs to me that the version these modules were added to c.g. might be mentioned in the description element of the docs, so that this information is not lost for the users. Not entirely sure about that, but when in doubt, I’d rather have more info than less info.

Other than that, AFAIR, we have to deal with:

- new KC modules being added to community.general
- the [existing KC issues in c.g.](https://github.com/ansible-collections/community.general/issues?q=is%3Aissue%20state%3Aopen%20keycloak) need to be migrated
- we should add redirects in c.g. to middleware\_automation.keycloak

Thanks for working on this! 😄

---

<div class="post-metadata">

**Author:** ![hcherukuri](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/hcherukuri/32/2877_2.png) [@hcherukuri](https://forum.ansible.com/u/hcherukuri)\
**Post date:** [May 30, 2026, 1:26pm UTC](https://forum.ansible.com/t/keycloak-modules-in-community-general/41746/28 "2026-05-30T13:26:47Z")

</div>

Hi @russoz, thanks for looking into the PR. I have added PRs #11841 and #11749, and updated version references from community.general in the keycloak collection.

For the redirects can we just add a comment for the pending PR’s to open them to keycloak collection? Let me know how we can handle this.

Thanks,  
Harsha

---

<div class="post-metadata">

**Author:** ![hcherukuri](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/hcherukuri/32/2877_2.png) [@hcherukuri](https://forum.ansible.com/u/hcherukuri)\
**Post date:** [June 1, 2026, 2:58pm UTC](https://forum.ansible.com/t/keycloak-modules-in-community-general/41746/29 "2026-06-01T14:58:04Z")

</div>

Happy to announce that Keycloak v3.0.7 is now available on Ansible Galaxy. This release includes all Keycloak modules from the community.general collection. [Release 3.0.7 · ansible-middleware/keycloak · GitHub](https://github.com/ansible-middleware/keycloak/releases/tag/3.0.7)

Ansible Collection: [Ansible Galaxy](https://galaxy.ansible.com/ui/repo/published/middleware_automation/keycloak/)

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [June 1, 2026, 4:04pm UTC](https://forum.ansible.com/t/keycloak-modules-in-community-general/41746/30 "2026-06-01T16:04:12Z")

</div>

Great to hear!

Please note that bugfix releases must not contain new features (in particular new modules). This should have been a 3.x.0 release.

Looking at the previous releases, this seems to have been done multiple times. I’d suggest to closely look at [https://semver.org/](https://semver.org/), as this is an important requirement for Ansible collections.

---

<div class="post-metadata">

**Author:** ![felix-grzelka](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felix-grzelka/32/10789_2.png) [@felix-grzelka](https://forum.ansible.com/u/felix-grzelka)\
**Post date:** [June 4, 2026, 5:57pm UTC](https://forum.ansible.com/t/keycloak-modules-in-community-general/41746/31 "2026-06-04T17:57:21Z")

</div>

Hi,  
just wanted to say, that the current release on `middleware_automation.keycloak` has breaking changes compared to the state of `community.general`.  
As mentioned here: [`normalize_keycloak_url` breaks URLs · Issue #347 · ansible-middleware/keycloak](https://github.com/ansible-middleware/keycloak/issues/347).  
There seems to be a diff in the `plugins/module_utils/[_]keycloak.py` file.  
This prevents us from switching switching to `middleware_automation.keycloak`, yet.  
Is this difference intentional or just something that was missed when migrating the changes from cg?

---

<div class="post-metadata">

**Author:** ![hcherukuri](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/hcherukuri/32/2877_2.png) [@hcherukuri](https://forum.ansible.com/u/hcherukuri)\
**Post date:** [June 5, 2026, 11:43am UTC](https://forum.ansible.com/t/keycloak-modules-in-community-general/41746/32 "2026-06-05T11:43:03Z")

</div>

Hi @felix-grzelka, I think this was missed. The changes was added to support quarkus previously. Now that we have [Remove normalize\_keycloak\_url by felix-grzelka · Pull Request #348 · ansible-middleware/keycloak · GitHub](https://github.com/ansible-middleware/keycloak/pull/348) merged. I can release new version of keycloak collection. Let me know if you see any other changes we need for to added in the keycloak collection to support the migration.

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [June 21, 2026, 9:55am UTC](https://forum.ansible.com/t/keycloak-modules-in-community-general/41746/33 "2026-06-21T09:55:31Z")

</div>

I put the following announcement into every Keycloak related issue (I counted 47) in community.general:

> Please note that all Keycloak content from this collection is being moved to the [`middleware_automation.keycloak`](https://galaxy.ansible.com/ui/repo/published/middleware_automation/keycloak/) collection, maintained in the [github.com/ansible-middleware/keycloak repository](https://github.com/ansible-middleware/keycloak). Please check out the [thread in the Ansible forum](https://forum.ansible.com/t/41746) for more information. The current modules in community.general will eventually be deprecated and replaced with redirects to their equivalents in `middleware_automation.keycloak`.

My plan is to redirect new feature PRs to the new repository from now on, and to ask bugfix PRs to be also be created for the new repository first, and only merge them in c.g once the corresponding PR is merged in the new repository.

Then we can soon start deprecating the existing content to replace it with redirects to middleware\_automation.keycloak soon, probably for community.general 14.0.0 (the next major release, probably somewhen in October or November).

Is that OK for everyone?

---

<div class="post-metadata">

**Author:** ![hcherukuri](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/hcherukuri/32/2877_2.png) [@hcherukuri](https://forum.ansible.com/u/hcherukuri)\
**Post date:** [June 26, 2026, 11:33am UTC](https://forum.ansible.com/t/keycloak-modules-in-community-general/41746/34 "2026-06-26T11:33:42Z")

</div>

sounds good. Let me know if you need anything from my side.

---

<div class="post-metadata">

**Author:** ![jon-nfc](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jon-nfc/32/10748_2.png) [@jon-nfc](https://forum.ansible.com/u/jon-nfc)\
**Post date:** [June 27, 2026, 5:49am UTC](https://forum.ansible.com/t/keycloak-modules-in-community-general/41746/35 "2026-06-27T05:49:08Z")

</div>

> [@hcherukuri](#):
>
> Hi @felix-grzelka, I think this was missed. The changes was added to support quarkus previously.

If semver is a requirement (assumed as stated in previous comment above). This “human error” can be mitigated by adopting conventional commits. Once adopted and then using CI with a “conventional commits” job it will look at each commit, and correctly generate the version number for you. Only adjustment is that developers correctly format their commits (and yes this can be linted as part of a PR CI job). see [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)

The [Workflow](https://github.com/nofusscomputing/action_bump/blob/development/.github/workflows/bump.yaml) I created and use does the git tagging and bumping of the version. Since implementing I have not had an issue with incorrect version numbers.

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [July 24, 2026, 5:55am UTC](https://forum.ansible.com/t/keycloak-modules-in-community-general/41746/36 "2026-07-24T05:55:44Z")

</div>

I’m currently preparing community.general PRs:

- for replacing the Keycloak content with deprecated redirects in community.general 14.0.0: [[WIP] Replace Keycloak content by deprecated redirects by felixfontein · Pull Request #12483 · ansible-collections/community.general · GitHub](https://github.com/ansible-collections/community.general/pull/12483)
- for announcing this in the 13.x.0 changelog: [[WIP] Announce replacement of Keycloak modules by deprecated redirects by felixfontein · Pull Request #12484 · ansible-collections/community.general · GitHub](https://github.com/ansible-collections/community.general/pull/12484)

(The PRs are not done yet, I noticed that one module recently added to community.general hasn’t been added to ansible\_middleware.keycloak yet, see [Issues · ansible-middleware/keycloak · GitHub](https://github.com/ansible-middleware/keycloak/issues/367.))

The redirects will be removed from community.general 16.0.0 according to the PRs. If anyone thinks this should happen later, please speak up now 🙂 (This means that the deprecated redirects are there for ~a year, as we have one major release every ~6 months.)

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [August 31, 2026, 7:49pm UTC](https://forum.ansible.com/t/keycloak-modules-in-community-general/41746/37 "2026-08-31T19:49:57Z")

</div>

I just merged [Replace Keycloak content by deprecated redirects by felixfontein · Pull Request #12483 · ansible-collections/community.general · GitHub](https://github.com/ansible-collections/community.general/pull/12483), which removed the Keycloak modules from community.general’s `main` branch (and closes all open issues for these modules). So once c.g 14.0.0 is out, the modules will be gone. The redirects are deprecated and will be removed from c.g 16.0.0.

---

<div class="post-metadata">

**Author:** ![hcherukuri](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/hcherukuri/32/2877_2.png) [@hcherukuri](https://forum.ansible.com/u/hcherukuri)\
**Post date:** [September 11, 2026, 3:10pm UTC](https://forum.ansible.com/t/keycloak-modules-in-community-general/41746/38 "2026-09-11T15:10:39Z")

</div>

@oranod @felixfontein @russoz [Release 3.1.0 · ansible-middleware/keycloak · GitHub](https://github.com/ansible-middleware/keycloak/releases/tag/3.1.0) is now available on Ansible Galaxy.

[Previous page](https://forum.ansible.com/t/keycloak-modules-in-community-general/41746.md?page=1)
