community.general icon indicating copy to clipboard operation
community.general copied to clipboard

keycloak_client: token based access issue

Open unbreakabl3 opened this issue 5 months ago • 3 comments

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

  • [X] I agree to follow the Ansible Code of Conduct

unbreakabl3 avatar Sep 05 '24 08:09 unbreakabl3