From 0618bc92781a4de621284741d45baaaea4a27795 Mon Sep 17 00:00:00 2001 From: Maksim Kramarenko Date: Thu, 15 Aug 2024 13:51:17 +0200 Subject: [PATCH 1/5] Inclide Tailscale is stopped. --- tasks/uninstall.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasks/uninstall.yml b/tasks/uninstall.yml index 973b23c..4f7033d 100644 --- a/tasks/uninstall.yml +++ b/tasks/uninstall.yml @@ -16,6 +16,8 @@ - tailscale_status.rc != 2 # "bash: tailscale: command not found" - tailscale_status.rc != 127 + # "Tailscale is stopped." + - tailscale_status.rc != 1 - name: Uninstall | Delete Tailscale State ansible.builtin.file: From 2767c0bb25a0952185a8145939e56e4e738e1c63 Mon Sep 17 00:00:00 2001 From: Maksim Kramarenko Date: Wed, 11 Sep 2024 11:34:41 +0200 Subject: [PATCH 2/5] feat: Add debug info --- tasks/uninstall.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tasks/uninstall.yml b/tasks/uninstall.yml index 4f7033d..1a183ce 100644 --- a/tasks/uninstall.yml +++ b/tasks/uninstall.yml @@ -5,6 +5,38 @@ failed_when: false register: tailscale_status +- name: Uninstall | Add debug message + ansible.builtin.debug: + msg: "{{ tailscale_status }}" + +- name: Uninstall | Run tailscale bugreport before logout + ansible.builtin.command: tailscale bugreport + changed_when: false + failed_when: false + register: tailscale_bugreport + +- name: Uninstall | Add debug message + ansible.builtin.debug: + msg: "{{ tailscale_bugreport }}" + +- name: Uninstall | List content of /var/lib/tailscale + ansible.builtin.command: ls -la /var/lib/tailscale + changed_when: false + register: tailscale_lib_dir + +- name: Uninstall | Add debug message + ansible.builtin.debug: + msg: "{{ tailscale_lib_dir }}" + +- name: Uninstall | Gather tailscale version + ansible.builtin.command: tailscale version + changed_when: false + register: tailscale_version + +- name: Uninstall | Add debug message + ansible.builtin.debug: + msg: "{{ tailscale_version }}" + - name: Uninstall | De-register Tailscale Node become: true # Hack to get correct changed/ok status From 983d58a268ebe6448eab124a3e2b1d384412eb35 Mon Sep 17 00:00:00 2001 From: Maksim Kramarenko Date: Wed, 11 Sep 2024 11:36:57 +0200 Subject: [PATCH 3/5] more debug --- tasks/uninstall.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/uninstall.yml b/tasks/uninstall.yml index 1a183ce..bc514be 100644 --- a/tasks/uninstall.yml +++ b/tasks/uninstall.yml @@ -40,7 +40,7 @@ - name: Uninstall | De-register Tailscale Node become: true # Hack to get correct changed/ok status - ansible.builtin.shell: tailscale status; tailscale logout + ansible.builtin.shell: tailscale status; tailscale logout ; tailscale bugreport register: tailscale_logout changed_when: "'Logged out.' not in tailscale_status.stdout and 'not logged in' not in tailscale_status.stdout" when: From 163a29e4b69b5d5a0980e987525ff7cfcde63fc3 Mon Sep 17 00:00:00 2001 From: Maksim Kramarenko Date: Mon, 16 Sep 2024 20:16:03 +0200 Subject: [PATCH 4/5] TEC-748/add-debug-info2 --- tasks/uninstall.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/uninstall.yml b/tasks/uninstall.yml index bc514be..a853e2b 100644 --- a/tasks/uninstall.yml +++ b/tasks/uninstall.yml @@ -22,6 +22,7 @@ - name: Uninstall | List content of /var/lib/tailscale ansible.builtin.command: ls -la /var/lib/tailscale changed_when: false + failed_when: false register: tailscale_lib_dir - name: Uninstall | Add debug message From fd06339e0417b17de500b43bdc430c7ed5fb304e Mon Sep 17 00:00:00 2001 From: sjoshi10 Date: Mon, 16 Sep 2024 15:44:42 -0400 Subject: [PATCH 5/5] add failed_when to version check --- tasks/uninstall.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/uninstall.yml b/tasks/uninstall.yml index a853e2b..3cdbeb8 100644 --- a/tasks/uninstall.yml +++ b/tasks/uninstall.yml @@ -32,6 +32,7 @@ - name: Uninstall | Gather tailscale version ansible.builtin.command: tailscale version changed_when: false + failed_when: false register: tailscale_version - name: Uninstall | Add debug message