Refactored application variables

This commit is contained in:
2025-02-03 11:44:13 +01:00
parent ce13beff68
commit b11879650c
60 changed files with 294 additions and 255 deletions

View File

@@ -33,9 +33,9 @@ Defined in `vars/main.yml`:
| Variable | Description |
|---------------------------------|------------------------------------------------------------------|
| `keycloak_version` | Version of the Keycloak image. |
| `applications.keycloak.version` | Version of the Keycloak image. |
| `domain` | Domain where Keycloak will be accessible. |
| `keycloak_administrator_username` | Admin username for Keycloak. |
| `applications.keycloak.administrator_username` | Admin username for Keycloak. |
| `keycloak_administrator_password` | Admin password for Keycloak. |
| `database_host` | Host of the PostgreSQL database. |
| `database_name` | Name of the PostgreSQL database. |
@@ -66,8 +66,8 @@ Here is an example of how to use this role in a playbook:
hosts: all
vars:
domain: "auth.example.com"
keycloak_version: "21.1.0"
keycloak_administrator_username: "admin"
applications.keycloak.version: "21.1.0"
applications.keycloak.administrator_username: "admin"
keycloak_administrator_password: "securepassword"
database_host: "db.example.com"
database_name: "keycloak_db"

View File

@@ -3,13 +3,13 @@ services:
{% include 'templates/docker/services/' + database_type + '.yml.j2' %}
application:
image: quay.io/keycloak/keycloak:{{keycloak_version}}
image: quay.io/keycloak/keycloak:{{applications.keycloak.version}}
command: start
environment:
KC_HOSTNAME: https://{{domain}}
KC_HTTP_ENABLED: true
KC_HEALTH_ENABLED: true
KEYCLOAK_ADMIN: "{{keycloak_administrator_username}}"
KEYCLOAK_ADMIN: "{{applications.keycloak.administrator_username}}"
KEYCLOAK_ADMIN_PASSWORD: "{{keycloak_administrator_password}}"
KC_DB: postgres
KC_DB_URL: jdbc:postgresql://{{database_host}}/{{database_name}}