completed tailscale
This commit is contained in:
@@ -1,8 +1,57 @@
|
||||
# TODO: implement
|
||||
---
|
||||
- ansible.builtin.include_vars:
|
||||
file: tailscale.yml
|
||||
name: _tailscale
|
||||
- ansible.builtin.set_fact:
|
||||
pkgconfig_tailscale: "{{ _tailscale | ansible.builtin.combine(pkgconfig.tailscale) }}"
|
||||
- name: enable for linux
|
||||
block:
|
||||
- name: enable for RedHat distros
|
||||
block:
|
||||
- name: fedora >=41
|
||||
ansible.builtin.command:
|
||||
creates: /etc/yum.repos.d/tailscale.repo
|
||||
cmd: "dnf config-manager addrepo --from-repofile={{ pkgconfig_tailscale.url_base }}/fedora/tailscale.repo"
|
||||
become: true
|
||||
when:
|
||||
- ansible_distribution == 'Fedora'
|
||||
- ansible_distribution_major_version|int >= 41
|
||||
|
||||
- name: fedora <41
|
||||
ansible.builtin.command:
|
||||
creates: /etc/yum.repos.d/tailscale.repo
|
||||
cmd: "dnf config-manager --add-repo {{ pkgconfig_tailscale.url_base }}/fedora/tailscale.repo"
|
||||
become: true
|
||||
when:
|
||||
- ansible_distribution == 'Fedora'
|
||||
- ansible_distribution_major_version|int < 41
|
||||
|
||||
- name: rhel based distros
|
||||
ansible.builtin.command:
|
||||
creates: /etc/yum.repos.d/tailscale.repo
|
||||
cmd: "dnf config-manager --add-repo {{ pkgconfig_tailscale.url_base }}/rhel/{{ ansible_os_major_version }}/tailscale.repo"
|
||||
become: true
|
||||
when:
|
||||
- ansible_distribution != 'Fedora'
|
||||
when: ansible_os_family == 'RedHat'
|
||||
|
||||
- name: enable for Debian distros
|
||||
block:
|
||||
- name: install tailscale keyring
|
||||
block:
|
||||
- ansible.builtin.get_url:
|
||||
url: "{{ pkgconfig_tailscale.url_base }}/debian/{{ pkgconfig_tailscale.release[ansible_os_release].gpg }}"
|
||||
dest: /usr/share/keyrings/tailscale-archive-keyring.gpg
|
||||
become: true
|
||||
- ansible.builtin.get_url:
|
||||
url: "{{ pkgconfig_tailscale.url_base }}/debian/{{ pkgconfig_tailscale.release[ansible_os_release].list }}"
|
||||
dest: /etc/apt/sources.list.d/tailscale.list
|
||||
become: true
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
- name: append to syspkgs
|
||||
debug:
|
||||
msg: "NOT IMPLEMENTED YET"
|
||||
ansible.builtin.set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'tailscale' ] }}"
|
||||
when: ansible_os_family != 'Darwin'
|
||||
|
||||
- name: append to caskpkgs
|
||||
|
||||
@@ -51,6 +51,7 @@ pkgconfig:
|
||||
packer: {}
|
||||
python3: {}
|
||||
rust: {}
|
||||
tailscale: {}
|
||||
terraform: {}
|
||||
terraformls: {}
|
||||
terrarepo: {}
|
||||
|
||||
15
vars/tailscale.yml
Normal file
15
vars/tailscale.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
url_base: https://pkgs.tailscale.com/stable
|
||||
release:
|
||||
bookworm:
|
||||
gpg: bookworm.noarmor.gpg
|
||||
list: bookworm.tailscale-keyring.list
|
||||
bullseye:
|
||||
gpg: bullseye.noarmor.gpg
|
||||
list: bullseye.tailscale-keyring.list
|
||||
buster:
|
||||
gpg: buster.gpg
|
||||
list: buster.list
|
||||
stretch:
|
||||
gpg: stretch.gpg
|
||||
list: stretch.list
|
||||
Reference in New Issue
Block a user