add + enable tailscale role

This commit is contained in:
surtur 2023-07-29 23:41:16 +02:00
parent 0d03bdaf7a
commit 58344d560e
Signed by: wanderer
SSH Key Fingerprint: SHA256:MdCZyJ2sHLltrLBp0xQO0O1qTW9BT/xl5nXkDvhlMCI
2 changed files with 32 additions and 0 deletions

@ -10,3 +10,5 @@
# - rand # - rand
- configs - configs
- flathub - flathub
- role: tailscale
become: true

@ -0,0 +1,30 @@
---
- 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
...