Jacob Molnia
inital draft for deplyment
8b058a4
raw
history blame
768 Bytes
---
- 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"