mirror of
https://github.com/ansible-middleware/keycloak.git
synced 2025-07-29 16:11:34 -07:00
Run as root or systemd wont accept the pidfile
This commit is contained in:
parent
210d3ebf4d
commit
c7940e4f58
3 changed files with 8 additions and 29 deletions
|
@ -38,30 +38,12 @@
|
|||
daemon_reload: yes
|
||||
when: systemdunit.changed
|
||||
|
||||
- block:
|
||||
- name: start keycloak
|
||||
systemd:
|
||||
name: keycloak
|
||||
enabled: yes
|
||||
state: started
|
||||
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
|
||||
- name: start keycloak
|
||||
systemd:
|
||||
name: keycloak
|
||||
enabled: yes
|
||||
state: started
|
||||
become: yes
|
||||
|
||||
- command: "systemctl status keycloak"
|
||||
register: keycloak_service_status
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue