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
All checks were successful
Nix Format Check / check-format (pull_request) Successful in 37s
This commit is contained in:
parent
55b59a3364
commit
cfb75d8765
@ -12,6 +12,8 @@
|
|||||||
|
|
||||||
- name: Install Tailscale
|
- name: Install Tailscale
|
||||||
ansible.builtin.command: tailscale up
|
ansible.builtin.command: tailscale up
|
||||||
|
args:
|
||||||
|
creates: /var/lib/tailscale/tailscaled.state
|
||||||
when: tailscale_check.rc != 0
|
when: tailscale_check.rc != 0
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
@ -25,12 +27,11 @@
|
|||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
name: tailscaled
|
name: tailscaled
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: true
|
||||||
daemon_reload: yes
|
daemon_reload: true
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Notify user to authenticate Tailscale
|
- name: Notify user to authenticate Tailscale
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: "Please authenticate Tailscale by running: sudo tailscale up --operator=$USER"
|
msg: "Please authenticate Tailscale by running: sudo tailscale up --operator=$USER"
|
||||||
when: tailscale_status.rc != 0
|
when: tailscale_status.rc != 0
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user