add + enable tailscale role
This commit is contained in:
parent
0d03bdaf7a
commit
58344d560e
@ -10,3 +10,5 @@
|
|||||||
# - rand
|
# - rand
|
||||||
- configs
|
- configs
|
||||||
- flathub
|
- flathub
|
||||||
|
- role: tailscale
|
||||||
|
become: true
|
||||||
|
30
ansible/roles/tailscale/tasks/main.yml
Normal file
30
ansible/roles/tailscale/tasks/main.yml
Normal file
@ -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
|
||||||
|
...
|
Loading…
Reference in New Issue
Block a user