Skip to content

Commit

Permalink
feat: Add debug info (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
McSim85 authored Sep 11, 2024
2 parents 0618bc9 + 983d58a commit e21b86d
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion tasks/uninstall.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e21b86d

Please sign in to comment.