Drop service logfile, symlink log directory instead

main
Guido Grazioli 2022-01-14 10:14:24 +01:00
parent 94aecfcd87
commit d7597771cf
2 changed files with 11 additions and 4 deletions

View File

@ -6,9 +6,17 @@
tags:
- prereqs
- include_tasks: tasks/install.yml
- name: Include install tasks
include_tasks: tasks/install.yml
- include_tasks: tasks/systemd.yml
- name: Include systemd tasks
include_tasks: tasks/systemd.yml
- name: Link default logs directory
file:
state: link
src: "{{keycloak_jboss_home}}/standalone/log"
dest: /var/log/keycloak
- block:
- name: Check admin credentials by generating a token

View File

@ -83,8 +83,7 @@ startKeycloak() {
-Djboss.management.https.port=${KEYCLOAK_MANAGEMENT_HTTPS_PORT} \
-Djboss.node.name={{ inventory_hostname }} \
{% if keycloak_prefer_ipv4 %}-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses=true {% endif %}\
{% if keycloak_config_standalone_xml is defined %}--server-config={{ keycloak_config_standalone_xml }}{% endif %} \
2>&1 >> "${KEYCLOAK_LOGFILE}" &
{% if keycloak_config_standalone_xml is defined %}--server-config={{ keycloak_config_standalone_xml }}{% endif %} &
while [ ! -f ${KEYCLOAK_PIDFILE} ]; do sleep 1; done
fi
}