From d90c9685c424f72cce54e6bf076c202263cca712 Mon Sep 17 00:00:00 2001 From: Guido Grazioli Date: Tue, 14 Dec 2021 13:21:03 +0100 Subject: [PATCH] Debug molecule in gh workflow --- roles/keycloak/tasks/systemd.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/roles/keycloak/tasks/systemd.yml b/roles/keycloak/tasks/systemd.yml index 67fd2e1..c189a70 100644 --- a/roles/keycloak/tasks/systemd.yml +++ b/roles/keycloak/tasks/systemd.yml @@ -38,12 +38,23 @@ daemon_reload: yes when: systemdunit.changed -- name: start keycloak - systemd: - name: keycloak - enabled: yes - state: started - become: yes +- 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 - command: "systemctl status keycloak" register: keycloak_service_status