From bd1b8d348214d786abb66a2ffd50c9b5ef4c9385 Mon Sep 17 00:00:00 2001 From: djpbessems Date: Thu, 21 Apr 2022 09:58:03 +0200 Subject: [PATCH] Add rescue tasks for debugging --- playbook.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/playbook.yml b/playbook.yml index 05afbfb..ee9b402 100644 --- a/playbook.yml +++ b/playbook.yml @@ -155,4 +155,13 @@ K3S_TOKEN: "{{ cluster.token }}" # (hostvars[ansible_play_hosts[0]]).cluster.token K3S_URL: "{{ 'https://' + ( cluster.virtualip | ansible.utils.ipaddr('address') ) + ':6443' }}" + rescue: + + - name: Debug systemd unit + ansible.builtin.shell: + cmd: systemctl status k3s -l --no-pager; journalctl -u k3s.service -b --nopager + register: debug + - ansible.builtin.debug: + var: debug.stdout + when: inventory_hostname != ansible_play_hosts[0]