mirror of
https://github.com/ansible-middleware/keycloak.git
synced 2026-11-22 23:20:35 +00:00
Use removesuffix to strip overlapping path from hostname before re-appending http_relative_path, preventing /auth/auth/ duplication. Add molecule test for the relative path scenario.
25 lines
879 B
YAML
25 lines
879 B
YAML
---
|
|
- name: Verify
|
|
hosts: all
|
|
vars:
|
|
keycloak_quarkus_bootstrap_admin_password: "remembertochangeme"
|
|
keycloak_quarkus_bootstrap_admin_user: "remembertochangeme"
|
|
keycloak_uri: "http://localhost:8080/auth"
|
|
tasks:
|
|
- name: Populate service facts
|
|
ansible.builtin.service_facts:
|
|
- name: Check if keycloak service started
|
|
ansible.builtin.assert:
|
|
that:
|
|
- ansible_facts.services["keycloak.service"]["state"] == "running"
|
|
- ansible_facts.services["keycloak.service"]["status"] == "enabled"
|
|
- name: Verify openid endpoint with relative path
|
|
ansible.builtin.uri:
|
|
url: "{{ keycloak_uri }}/realms/master/.well-known/openid-configuration"
|
|
method: GET
|
|
validate_certs: no
|
|
register: keycloak_openid_response
|
|
until: keycloak_openid_response.status == 200
|
|
retries: 5
|
|
delay: 5
|