Added task to update default email settings

This commit is contained in:
Kevin Veen-Birkenbach 2025-08-20 16:41:53 +02:00
parent ad7e61e8b1
commit 384beae7c1
No known key found for this signature in database
GPG Key ID: 44D8F11FD62F878E

View File

@ -58,6 +58,24 @@
}} }}
include_tasks: _update.yml include_tasks: _update.yml
- name: "Update REALM mail settings"
include_tasks: _update.yml
vars:
kc_object_kind: "realm"
kc_lookup_field: "id"
kc_lookup_value: "{{ KEYCLOAK_REALM }}"
kc_desired:
smtpServer:
from: "no-reply@{{ DEFAULT_SYSTEM_EMAIL.DOMAIN }}"
fromDisplayName: "{{ SOFTWARE_NAME | default('Infinito.Nexus') }}"
host: "{{ DEFAULT_SYSTEM_EMAIL.HOST }}"
port: "{{ DEFAULT_SYSTEM_EMAIL.PORT }}"
# Keycloak expects strings "true"/"false"
ssl: "{{ 'true' if not DEFAULT_SYSTEM_EMAIL.START_TLS and DEFAULT_SYSTEM_EMAIL.TLS else 'false' }}"
starttls: "{{ 'true' if DEFAULT_SYSTEM_EMAIL.START_TLS else 'false' }}"
user: "{{ DEFAULT_SYSTEM_EMAIL.USER | default('') }}"
password: "{{ DEFAULT_SYSTEM_EMAIL.PASSWORD | default('') }}"
- include_tasks: 05_rbac_client_scope.yml - include_tasks: 05_rbac_client_scope.yml
- include_tasks: 06_ldap.yml - include_tasks: 06_ldap.yml