Spaces:
No application file
No application file
File size: 767 Bytes
8b058a4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
---
- name: Install and configure Tailscale
hosts: all
become: yes
vars_files:
- ../vars/secrets.yml
tasks:
- name: Add Tailscale GPG key
apt_key:
url: https://pkgs.tailscale.com/stable/ubuntu/focal.gpg
state: present
- name: Add Tailscale repository
apt_repository:
repo: deb https://pkgs.tailscale.com/stable/ubuntu focal main
state: present
filename: tailscale
- name: Install Tailscale
apt:
name: tailscale
state: present
update_cache: yes
- name: Run tailscale up with pre-authentication
command: tailscale up --authkey={{ vault_tailscale_authkey }}
register: tailscale_result
changed_when: "'Success' in tailscale_result.stdout"
|