You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
adc/ansible/roles/tailscale/tasks/main.yml

44 lines
1.2 KiB

---
- 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