Skip to content

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Sep 18, 2025

This is a backport of PR #10829 as merged into main (7c40c6b).

SUMMARY

Fixes an issue where keycloak_role incorrectly returns "changed" when using the alias clientId in composite roles.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

keycloak_role

ADDITIONAL INFORMATION
- name: Unchanged role with composites using aliases - should return no change
  community.general.keycloak_role:
    auth_keycloak_url: "{{ url }}"
    auth_realm: "{{ admin_realm }}"
    auth_username: "{{ admin_user }}"
    auth_password: "{{ admin_password }}"
    name: "Test"
    realm: "my-realm"
    description: "My composite role"
    composite: true
    composites:
      - name: view-clients
        clientId: "realm-management"
        state: present
      - name: query-clients
        clientId: "realm-management"
        state: present
    keycloak_client_id: test-client
    state: present
  register: result

* Exclude aliases before comparison

* add test

* fragment

* Update changelogs/fragments/10829-fix-keycloak-role-changed-status.yml

Co-authored-by: Felix Fontein <[email protected]>

---------

Co-authored-by: Andre Desrosiers <[email protected]>
Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit 7c40c6b)
@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added backport bug This issue/PR relates to a bug integration tests/integration module module new_contributor Help guide this first time contributor plugins plugin (any type) tests tests labels Sep 18, 2025
@ansibullbot ansibullbot added the stale_ci CI is older than 7 days, rerun before merging label Oct 2, 2025
@felixfontein felixfontein merged commit 5af8d61 into stable-11 Oct 5, 2025
137 checks passed
@felixfontein felixfontein deleted the patchback/backports/stable-11/7c40c6b6b5144ca471fc2a456b5e9409ce0fde21/pr-10829 branch October 5, 2025 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport bug This issue/PR relates to a bug integration tests/integration module module new_contributor Help guide this first time contributor plugins plugin (any type) stale_ci CI is older than 7 days, rerun before merging tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants