---
# https://tailscale.com/download/linux/ubuntu-2204

- name: add tailscale signing key
  ansible.builtin.apt_key:
    url: https://pkgs.tailscale.com/stable/ubuntu/{{ ansible_distribution_release }}.gpg

- name: add tailscale repository
  ansible.builtin.apt_repository:
    repo: deb https://pkgs.tailscale.com/stable/ubuntu {{ ansible_distribution_release }} main
    filename: tailscale

- name: install tailscale
  ansible.builtin.apt: name=tailscale update_cache=yes

---
# https://tailscale.com/download/linux/ubuntu-2204

- name: download tailscale signing key
  ansible.builtin.get_url:
    url: https://pkgs.tailscale.com/stable/ubuntu/{{ ansible_distribution_release }}.noarmor.gpg
    dest: /usr/share/keyrings/tailscale-archive-keyring.gpg
    owner: root
    group: root
    mode: 0644

- name: add tailscale signing key
  ansible.builtin.apt_key:
    url: https://pkgs.tailscale.com/stable/ubuntu/{{ ansible_distribution_release }}.gpg

- name: add tailscale repository
  ansible.builtin.apt_repository:
    repo: >
      deb [signed-by=/usr/share/keyrings/tailscale-archive-keyring.gpg]
      https://pkgs.tailscale.com/stable/ubuntu {{ ansible_distribution_release }} main
    filename: tailscale

- name: install tailscale
  ansible.builtin.apt: name=tailscale update_cache=yes

Upgrade tailscale to more secure install method
Upgrade tailscale to more secure install method
