Skip to content

keycloak_client: token based access issue #8829

Open
@unbreakabl3

Description

@unbreakabl3

Summary

Following the documentation here, it is possible to use an access token instead of username and password. No matter what I am doing, I am always getting that error:

fatal: [localhost]: FAILED! => {"changed": false, "msg": "parameters are required together: auth_realm, auth_username, auth_password"}

It is forcing to provide a username and password. Is there something I am doing wrong?
The task:

- name: Create Keycloak Client
  community.general.keycloak_client:
    auth_client_id: "{{ kc_auth_client_id }}"
    auth_keycloak_url: "{{ kc_url }}"
    auth_realm: "{{ kc_auth_realm }}"
    token: "{{ keycloak_jwt_access_token }}"
    state: present
    realm: "{{ kc_auth_realm }}"
    client_id: "{{ kc_client_id }}"
  delegate_to: localhost

Issue Type

Documentation Report

Component Name

keycloak_client

Ansible Version

$ ansible --version
core 2.17.3

Community.general Version

$ ansible-galaxy collection list community.general

Configuration

$ ansible-config dump --only-changed
# /opt/homebrew/Cellar/ansible/10.3.0/libexec/lib/python3.12/site-packages/ansible_collections
Collection        Version
----------------- -------
community.general 9.3.0

OS / Environment

MacOS

Additional Information

No response

Code of Conduct

  • I agree to follow the Ansible Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions