refactor: enhance Tailscale installation task with state check and improved service management
All checks were successful
Nix Format Check / check-format (pull_request) Successful in 37s

This commit is contained in:
Menno van Leeuwen 2025-01-21 00:04:21 +01:00
parent 55b59a3364
commit cfb75d8765
Signed by: vleeuwenmenno
SSH Key Fingerprint: SHA256:OJFmjANpakwD3F2Rsws4GLtbdz1TJ5tkQF0RZmF0TRE

View File

@ -12,6 +12,8 @@
- name: Install Tailscale
ansible.builtin.command: tailscale up
args:
creates: /var/lib/tailscale/tailscaled.state
when: tailscale_check.rc != 0
become: true
@ -25,12 +27,11 @@
ansible.builtin.systemd:
name: tailscaled
state: started
enabled: yes
daemon_reload: yes
enabled: true
daemon_reload: true
become: true
- name: Notify user to authenticate Tailscale
ansible.builtin.debug:
msg: "Please authenticate Tailscale by running: sudo tailscale up --operator=$USER"
when: tailscale_status.rc != 0