Run as root or systemd wont accept the pidfile
parent
210d3ebf4d
commit
c7940e4f58
|
@ -20,7 +20,7 @@ keycloak_jboss_home: "{{ keycloak_rhsso_installdir if rhsso_rhn_id is defined el
|
||||||
keycloak_config_dir: "{{ keycloak_jboss_home }}/standalone/configuration"
|
keycloak_config_dir: "{{ keycloak_jboss_home }}/standalone/configuration"
|
||||||
keycloak_service_user: keycloak
|
keycloak_service_user: keycloak
|
||||||
keycloak_service_group: keycloak
|
keycloak_service_group: keycloak
|
||||||
keycloak_service_pidfile: "{{ keycloak_dest }}/keycloak.pid"
|
keycloak_service_pidfile: "/run/keycloak.pid"
|
||||||
keycloak_service_logfile: "{{ keycloak_dest }}/keycloak.log"
|
keycloak_service_logfile: "{{ keycloak_dest }}/keycloak.log"
|
||||||
|
|
||||||
### Keycloak configuration settings
|
### Keycloak configuration settings
|
||||||
|
|
|
@ -38,30 +38,12 @@
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
when: systemdunit.changed
|
when: systemdunit.changed
|
||||||
|
|
||||||
- block:
|
- name: start keycloak
|
||||||
- name: start keycloak
|
|
||||||
systemd:
|
systemd:
|
||||||
name: keycloak
|
name: keycloak
|
||||||
enabled: yes
|
enabled: yes
|
||||||
state: started
|
state: started
|
||||||
become: yes
|
become: yes
|
||||||
rescue:
|
|
||||||
- command: "systemctl status keycloak"
|
|
||||||
changed_when: False
|
|
||||||
ignore_errors: True
|
|
||||||
- command: "journalctl -xe -ukeycloak"
|
|
||||||
changed_when: False
|
|
||||||
ignore_errors: True
|
|
||||||
- command: "tail -n 100 /opt/keycloak/keycloak.log"
|
|
||||||
changed_when: False
|
|
||||||
ignore_errors: True
|
|
||||||
- debug:
|
|
||||||
msg: "Virt type: {{ ansible_facts.virtualization_type }}"
|
|
||||||
changed_when: False
|
|
||||||
ignore_errors: True
|
|
||||||
- command: "cat /opt/keycloak/keycloak-service.sh"
|
|
||||||
changed_when: False
|
|
||||||
ignore_errors: True
|
|
||||||
|
|
||||||
- command: "systemctl status keycloak"
|
- command: "systemctl status keycloak"
|
||||||
register: keycloak_service_status
|
register: keycloak_service_status
|
||||||
|
|
|
@ -5,13 +5,10 @@ After=network.target
|
||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=forking
|
||||||
EnvironmentFile=-/etc/sysconfig/keycloak
|
EnvironmentFile=-/etc/sysconfig/keycloak
|
||||||
|
|
||||||
User={{ keycloak_service_user }}
|
|
||||||
Group={{ keycloak_service_group }}
|
|
||||||
PIDFile={{ keycloak_service_pidfile }}
|
PIDFile={{ keycloak_service_pidfile }}
|
||||||
ExecStart={{ keycloak_dest }}/keycloak-service.sh start
|
ExecStart={{ keycloak_dest }}/keycloak-service.sh start
|
||||||
ExecStop={{ keycloak_dest }}/keycloak-service.sh stop
|
ExecStop={{ keycloak_dest }}/keycloak-service.sh stop
|
||||||
TimeoutStartSec=45
|
TimeoutStartSec=30
|
||||||
TimeoutStopSec=30
|
TimeoutStopSec=30
|
||||||
LimitNOFILE=102642
|
LimitNOFILE=102642
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue