We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When we want to create or update a sub-group, we fetch children of the parent group to know which sub group exist and should be updated. The API is paginated by default with a maximum of 10 result and the api call does not set the corresponding paremeter.
So, when we try to create more than 10 sub-groups, we have the error : Sibling group named '...' already exists.
Sibling group named '...' already exists.
Bug Report
community.general.keycloak_group
➜ ansible --version ansible [core 2.16.3]
Collection Version ----------------- ------- community.general 10.2.0
I do not use the latest version because i have another issue with roles (#9678) but the error is also present on the latest version
➜ ansible-config dump --only-changed CONFIG_FILE() = None PAGER(env: PAGER) = less
➜ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 24.04.1 LTS Release: 24.04 Codename: noble
Create more than 10 subgroups
--- - name: Create ROOT Group community.general.keycloak_group: auth_client_id: admin-cli auth_keycloak_url: "keycloak_base_url" auth_realm: master auth_username: "keycloak_admin_username" auth_password: "keycloak_admin_password" realm: "master" name: "parent_group" - name: Create SUB Groups community.general.keycloak_group: auth_client_id: admin-cli auth_keycloak_url: "keycloak_base_url" auth_realm: master auth_username: "keycloak_admin_username" auth_password: "keycloak_admin_password" state: present realm: "master" name: "{{ group.name }}" parents: - name: "parent_group" loop: - name: SUB_GROUP_1 - name: SUB_GROUP_2 - name: SUB_GROUP_3 - name: SUB_GROUP_4 - name: SUB_GROUP_5 - name: SUB_GROUP_6 - name: SUB_GROUP_7 - name: SUB_GROUP_8 - name: SUB_GROUP_9 - name: SUB_GROUP_10 - name: SUB_GROUP_11 loop_control: loop_var: group
Do not block and create conflict when we want to create more than 10 children.
failed: [keycloak_host] (item={'name': 'MY_CHILDREN', 'parent': 'parent_group'}) => {"ansible_loop_var": "group", "changed": false, "group": {"name": "MY_CHILDREN", "parent": "parent_group"}, "msg": "Could not create subgroup MY_CHILDREN for parent group cc1df29f-77cc-4ced-935e-3641d36667f8 in realm master: HTTP Error 409: Conflict: {\"errorMessage\":\"Sibling group named 'MY_CHILDREN' already exists.\"}"}
The text was updated successfully, but these errors were encountered:
Files identified in the description:
plugins/modules/keycloak_group.py
If these files are incorrect, please update the component name section of the description or use the !component bot command.
component name
!component
click here for bot help
Sorry, something went wrong.
cc @adamgoossens @eikef @mattock @ndclt @thomasbach-dev click here for bot help
fix(keycloak): update more than 10 sub-groups (ansible-collections#9690)
29c7b61
Successfully merging a pull request may close this issue.
Summary
When we want to create or update a sub-group, we fetch children of the parent group to know which sub group exist and should be updated.
The API is paginated by default with a maximum of 10 result and the api call does not set the corresponding paremeter.
So, when we try to create more than 10 sub-groups, we have the error :
Sibling group named '...' already exists.
Issue Type
Bug Report
Component Name
community.general.keycloak_group
Ansible Version
Community.general Version
I do not use the latest version because i have another issue with roles (#9678) but the error is also present on the latest version
Configuration
OS / Environment
Steps to Reproduce
Create more than 10 subgroups
Expected Results
Do not block and create conflict when we want to create more than 10 children.
Actual Results
failed: [keycloak_host] (item={'name': 'MY_CHILDREN', 'parent': 'parent_group'}) => {"ansible_loop_var": "group", "changed": false, "group": {"name": "MY_CHILDREN", "parent": "parent_group"}, "msg": "Could not create subgroup MY_CHILDREN for parent group cc1df29f-77cc-4ced-935e-3641d36667f8 in realm master: HTTP Error 409: Conflict: {\"errorMessage\":\"Sibling group named 'MY_CHILDREN' already exists.\"}"}
Code of Conduct
The text was updated successfully, but these errors were encountered: