tag specific to the systemd unit.

This commit is contained in:
Andrea Dell'Amico 2024-11-04 18:53:04 +01:00
parent a0a92dc3c4
commit 62ad034604
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
2 changed files with 10 additions and 1 deletions

View File

@ -15,6 +15,7 @@
- keycloak_conf
- keycloak_providers
- keycloak_providers_jar
- keycloak_systemd_unit
block:
- name: Install the keycloak systemd unit
ansible.builtin.template:

View File

@ -1,3 +1,6 @@
#
# Systemd unit file that manages Keycloak
#
[Unit]
Description=Keycloak Application Server, running with Quarkus
After=syslog.target network.target
@ -12,6 +15,8 @@ Before=httpd.service
Before=apache2.service
{% endif %}
{% endif %}
StartLimitIntervalSec=500
StartLimitBurst=5
[Service]
Environment=JAVA={{ keycloak_openjdk_bin }}
@ -22,9 +27,12 @@ Environment=JAVA_OPTS_APPEND="-Djgroups.bind_addr={{ keycloak_jgroups_multicast_
{% endif %}
User={{ keycloak_user }}
Group={{ keycloak_user }}
ExecStart={{ keycloak_runtime_home }}/bin/kc.sh start
SuccessExitStatus=0 143
UMask=0027
ExecStart={{ keycloak_runtime_home }}/bin/kc.sh start
RestartSec=10
Restart=on-failure
[Install]
WantedBy=multi-user.target