infra/ansible/roles/tailscale/tasks/main.yml

31 lines
718 B
YAML

---
- name: Install Tailscale repo
ansible.builtin.command:
cmd: >
dnf config-manager --add-repo \
"https://pkgs.tailscale.com/stable/fedora/tailscale.repo"
args:
creates: /etc/yum.repos.d/tailscale.repo
when: ansible_distribution == "Fedora"
- name: Enable Tailscale repo
community.general.ini_file:
path: /etc/yum.repos.d/tailscale.repo
section: tailscale-stable
option: enabled
value: 1
create: false
when: ansible_distribution == "Fedora"
- name: Install Tailscale
ansible.builtin.package:
name: tailscale
state: present
- name: Enable Tailscale systemd service
ansible.builtin.systemd:
name: tailscaled
state: started
enabled: true
...