mirror of
https://github.com/ansible-middleware/keycloak.git
synced 2025-04-06 02:40:30 -07:00
28 lines
829 B
Django/Jinja
28 lines
829 B
Django/Jinja
{{ ansible_managed | comment }}
|
|
[Unit]
|
|
Description=Keycloak Server
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
EnvironmentFile=-{{ keycloak_quarkus_sysconf_file }}
|
|
PIDFile={{ keycloak_quarkus_service_pidfile }}
|
|
{% if keycloak_quarkus_start_dev %}
|
|
ExecStart={{ keycloak.home }}/bin/kc.sh start-dev
|
|
{% else %}
|
|
ExecStart={{ keycloak.home }}/bin/kc.sh start --optimized
|
|
{% endif %}
|
|
User={{ keycloak.service_user }}
|
|
Group={{ keycloak.service_group }}
|
|
{% if keycloak_quarkus_service_restart_always %}
|
|
Restart=always
|
|
{% elif keycloak_quarkus_service_restart_on_failure %}
|
|
Restart=on-failure
|
|
{% endif %}
|
|
RestartSec={{ keycloak_quarkus_service_restartsec }}
|
|
{% if keycloak_quarkus_http_port|int < 1024 or keycloak_quarkus_https_port|int < 1024 %}
|
|
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
|
{% endif %}
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|