Skip to content
Discussion options

You must be logged in to vote

Above can be ignored. It works with curl, so it took a while for me to find a solution.
In the end the following worked in Ansible.
(Personally I think this piece of code should be in the admin manual in some form).

vars:
    keycloak_server_url: https://ad.company.lan:8443
    realm: COMPANY.LAN

    - name: Retrieve token url from server
      uri:
        url: "{{ keycloak_server_url }}/realms/master"
        validate_certs: false
      register: tokenurl

    - debug:
        var: tokenurl.json["token-service"] 

    - name: Store url for easier retrieval
      set_fact:
        token_url: "{{ tokenurl.json[\"token-service\"] }}"

   - name: "Retrieve endpoint info for our realm {{ re…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by kwoot
Comment options

You must be logged in to vote
1 reply
@kwoot
Comment options

Comment options

You must be logged in to vote
1 reply
@jaymberry
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants