Files
ansible-pull/roles/backup/tasks/system_setup/configure_tailscale.yml

21 lines
599 B
YAML

---
- include_vars: "headscale.yml"
ignore_errors: True
- name: backup | tailscale | ensure tailscale is enabled and running
tags: tailscale,system,system setup
service:
name: tailscaled
state: started
enabled: true
- name: backup | tailscale | connect to headscale
tags: tailscale,system,system setup
command: "tailscale up --login-server {{ headscale_url }} --authkey {{ headscale_authkey }}"
args:
creates: /var/lib/tailscale/tailscaled.state
when:
- headscale_url is defined
- headscale_authkey is defined
changed_when: true
notify: restart tailscaled