diff --git a/ansible/playbooks/surtur.yml b/ansible/playbooks/surtur.yml index 5c9a4cf..60e813d 100644 --- a/ansible/playbooks/surtur.yml +++ b/ansible/playbooks/surtur.yml @@ -10,3 +10,5 @@ # - rand - configs - flathub + - role: tailscale + become: true diff --git a/ansible/roles/tailscale/tasks/main.yml b/ansible/roles/tailscale/tasks/main.yml new file mode 100644 index 0000000..77aabba --- /dev/null +++ b/ansible/roles/tailscale/tasks/main.yml @@ -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 +...