completed tailscale
This commit is contained in:
@@ -1,8 +1,57 @@
|
||||
# TODO: implement
|
||||
---
|
||||
- name: append to syspkgs
|
||||
debug:
|
||||
msg: "NOT IMPLEMENTED YET"
|
||||
- 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
|
||||
ansible.builtin.set_fact:
|
||||
syspkgs: "{{ syspkgs + [ 'tailscale' ] }}"
|
||||
when: ansible_os_family != 'Darwin'
|
||||
|
||||
- name: append to caskpkgs
|
||||
|
||||
Reference in New Issue
Block a user