mirror of
https://github.com/FAUSheppy/no-secrets-athq-ansible
synced 2025-12-10 08:48:33 +01:00
fix: keycloak problems
This commit is contained in:
@@ -18,8 +18,6 @@
|
|||||||
src: "{{ item }}"
|
src: "{{ item }}"
|
||||||
dest: "/opt/keycloak/"
|
dest: "/opt/keycloak/"
|
||||||
with_items:
|
with_items:
|
||||||
- keycloak.env
|
|
||||||
- postgres.env
|
|
||||||
- postgres_password
|
- postgres_password
|
||||||
|
|
||||||
- name: Deploy compose templates
|
- name: Deploy compose templates
|
||||||
@@ -28,3 +26,46 @@
|
|||||||
pull: true
|
pull: true
|
||||||
files:
|
files:
|
||||||
- "keycloak.yaml"
|
- "keycloak.yaml"
|
||||||
|
|
||||||
|
- name: Check/Wait for Keycloak to be up
|
||||||
|
uri:
|
||||||
|
url: https://keycloak.atlantishq.de/health
|
||||||
|
method: GET
|
||||||
|
return_content: yes
|
||||||
|
status_code: 200
|
||||||
|
body_format: json
|
||||||
|
register: result
|
||||||
|
until: result.json.status == "UP"
|
||||||
|
retries: 10
|
||||||
|
delay: 20
|
||||||
|
|
||||||
|
#- name: Image Client
|
||||||
|
# local_action:
|
||||||
|
# module: keycloak_client
|
||||||
|
# auth_client_id: admin-cli
|
||||||
|
# auth_keycloak_url: https://keycloak.atlantishq.de/
|
||||||
|
# auth_realm: master
|
||||||
|
# auth_username: admin
|
||||||
|
# auth_password: "{{ keycloak_admin_password }}"
|
||||||
|
# state: present
|
||||||
|
# realm: master
|
||||||
|
# client_id: web1
|
||||||
|
# id: 00000000-0000-0000-0000-000000000001
|
||||||
|
# name: Images Upload
|
||||||
|
# description: Client for Web1 Services
|
||||||
|
# enabled: True
|
||||||
|
# client_authenticator_type: client-secret
|
||||||
|
# secret: "{{ keycloak_images_client_secret }}"
|
||||||
|
# redirect_uris:
|
||||||
|
# - https://images.atlantishq.de/*
|
||||||
|
# - https://images.potaris.de/*
|
||||||
|
# - https://sls.atlantishq.de/*
|
||||||
|
# - https://sounds.potaris.de/*
|
||||||
|
# - https://serienampel.atlantishq.de/*
|
||||||
|
# web_origins:
|
||||||
|
# - https://images.atlantishq.de/*
|
||||||
|
# - https://images.potaris.de/*
|
||||||
|
# - https://sls.atlantishq.de/*
|
||||||
|
# - https://serienampel.atlantishq.de/*
|
||||||
|
# frontchannel_logout: False
|
||||||
|
# protocol: openid-connect
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
KEYCLOAK_ADMIN=admin
|
|
||||||
KEYCLOAK_ADMIN_PASSWORD={{ keycloak_admin_password }}
|
|
||||||
PROXY_ADDRESS_FORWARDING=true
|
|
||||||
KC_PROXY=edge
|
|
||||||
KC_LOG_LEVEL=ALL
|
|
||||||
|
|
||||||
KC_DB_URL_HOST=postgres
|
|
||||||
KC_DB_USERNAME=keycloak
|
|
||||||
KC_DB_PASSWORD={{ keycloak_postgres_password }}
|
|
||||||
@@ -5,9 +5,20 @@ version: '3.3'
|
|||||||
services:
|
services:
|
||||||
keycloak:
|
keycloak:
|
||||||
container_name: keycloak-container
|
container_name: keycloak-container
|
||||||
command: start-dev --http-enabled=true
|
command: start --hostname-strict=false --log-level=WARNING
|
||||||
image: quay.io/keycloak/keycloak:18.0.0
|
image: quay.io/keycloak/keycloak:20.0.2
|
||||||
env_file: keycloak.env
|
environment:
|
||||||
|
- KEYCLOAK_ADMIN=admin
|
||||||
|
- KEYCLOAK_ADMIN_PASSWORD={{ keycloak_admin_password }}
|
||||||
|
- PROXY_ADDRESS_FORWARDING=true
|
||||||
|
- KC_PROXY=edge
|
||||||
|
- KC_LOG_LEVEL=ALL
|
||||||
|
- KC_DB_URL_HOST=postgres
|
||||||
|
- KC_DB_USERNAME=keycloak
|
||||||
|
- KC_DB_PASSWORD={{ keycloak_postgres_password }}
|
||||||
|
- KC_HEALTH_ENABLED=true
|
||||||
|
- KC_METRICS_ENABLED=true
|
||||||
|
- KEYCLOAK_LOGLEVEL=WARN
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- 5050:8080
|
- 5050:8080
|
||||||
@@ -17,8 +28,11 @@ services:
|
|||||||
- postgres_password
|
- postgres_password
|
||||||
postgres:
|
postgres:
|
||||||
container_name: postgres-container
|
container_name: postgres-container
|
||||||
image: postgres:13.2
|
image: postgres:15.1
|
||||||
env_file: postgres.env
|
environment:
|
||||||
|
- POSTGRES_DB=keycloak
|
||||||
|
- POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password
|
||||||
|
- POSTGRES_USER=keycloak
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
secrets:
|
secrets:
|
||||||
- postgres_password
|
- postgres_password
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
POSTGRES_DB=keycloak
|
|
||||||
POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password
|
|
||||||
POSTGRES_USER=keycloak
|
|
||||||
Reference in New Issue
Block a user