44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
|
---
|
||
|
|
||
|
- name: Add Tailscale repository key (ubuntu)
|
||
|
apt_key:
|
||
|
url: "https://pkgs.tailscale.com/stable/ubuntu/{{ ansible_distribution_release }}.gpg"
|
||
|
state: present
|
||
|
become: true
|
||
|
when: ansible_distribution == "Ubuntu"
|
||
|
|
||
|
- name: Add Tailscale repository (ubuntu)
|
||
|
apt_repository:
|
||
|
repo: "deb https://pkgs.tailscale.com/stable/ubuntu {{ ansible_distribution_release }} main"
|
||
|
filename: tailscale
|
||
|
state: present
|
||
|
become: true
|
||
|
when: ansible_distribution == "Ubuntu"
|
||
|
|
||
|
- name: Add Tailscale repository key (debian)
|
||
|
apt_key:
|
||
|
url: "https://pkgs.tailscale.com/stable/debian/{{ ansible_distribution_release }}.gpg"
|
||
|
state: present
|
||
|
become: true
|
||
|
when: ansible_distribution == "Debian"
|
||
|
|
||
|
- name: Add Tailscale repository (debian)
|
||
|
apt_repository:
|
||
|
repo: "deb https://pkgs.tailscale.com/stable/debian {{ ansible_distribution_release }} main"
|
||
|
filename: tailscale
|
||
|
state: present
|
||
|
become: true
|
||
|
when: ansible_distribution == "Debian"
|
||
|
|
||
|
- name: Install packages
|
||
|
apt:
|
||
|
name:
|
||
|
- tailscale
|
||
|
state: present
|
||
|
become: true
|
||
|
|
||
|
- name: Connect machine to your Tailscale network
|
||
|
command: tailscale up -authkey {{ tailscale_auth_key }}
|
||
|
changed_when: no
|
||
|
become: true
|