diff --git a/tasks/uninstall.yml b/tasks/uninstall.yml index 4f7033da..bc514be0 100644 --- a/tasks/uninstall.yml +++ b/tasks/uninstall.yml @@ -5,10 +5,42 @@ 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 - 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: