From 3e048e5159a95bf829e7377d00cefa8a2992071b Mon Sep 17 00:00:00 2001 From: Hyperling Date: Tue, 11 Aug 2026 15:13:29 -0700 Subject: [PATCH] vpn, symlink the command for all systems and move the runit enable outside the distro block. --- tasks/workstation/linux/software/vpn.yml | 43 ++++++++++++------------ 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/tasks/workstation/linux/software/vpn.yml b/tasks/workstation/linux/software/vpn.yml index cb62df5..a9bab8e 100644 --- a/tasks/workstation/linux/software/vpn.yml +++ b/tasks/workstation/linux/software/vpn.yml @@ -31,47 +31,31 @@ name: - mullvad-vpn-runit state: present - when: ansible_distribution == "Artix" + when: ansible_pkg_mgr == "pacman" and ansible_service_mgr == "runit" - - name: Workstation | Software | VPN | Mullvad | Symlink GUI - ansible.builtin.file: - src: "/opt/Mullvad VPN/mullvad-vpn" - dest: "{{ global_bin }}/mullvad-vpn" - state: link - force: true - - - name: Workstation | Software | VPN | Mullvad | Enable (Artix, runit) - ansible.builtin.file: - src: "/etc/runit/sv/mullvad-daemon" - dest: "/run/runit/services/mullvad" - state: link - force: true - when: ansible_service_mgr == "runit" - when: ansible_distribution in ("Debian", "Ubuntu", "Arch", "Artix") -# TBD: VPNs for distros like Devuan. -- name: Workstation | Software | VPN | Mullvad | Devuan Block +- name: Workstation | Software | VPN | Mullvad | Devuan (runit) block: - - name: Workstation | Software | VPN | Mullvad | Devuan Block | Facts 01 + - name: Workstation | Software | VPN | Mullvad | Devuan | Facts 01 set_fact: devuan_mullvad_dir: ~/Downloads/mullvad-installer mullvad_deb_url: https://mullvad.net/en/download/app/deb/latest mullvad_repack_url: https://github.com/sys-fs/mullvad-repack - - name: Workstation | Software | VPN | Mullvad | Devuan Block | Facts 02 + - name: Workstation | Software | VPN | Mullvad | Devuan | Facts 02 set_fact: mullvad_repack_dir: "{{ devuan_mullvad_dir }}/mullvad_repack" - - name: Workstation | Software | VPN | Mullvad | Devuan Block | Check + - name: Workstation | Software | VPN | Mullvad | Devuan | Check stat: path: "/opt/Mullvad VPN" register: mullvad_installed - - name: Workstation | Software | VPN | Mullvad | Devuan Block | Install + - name: Workstation | Software | VPN | Mullvad | Devuan | Install shell: "{{ item }}" loop: - "mkdir -pv {{ devuan_mullvad_dir }}" @@ -85,3 +69,18 @@ when: ansible_pkg_mgr == "apt" and ansible_service_mgr != "systemd" + +- name: Workstation | Software | VPN | Mullvad | Symlink GUI + ansible.builtin.file: + src: "/opt/Mullvad VPN/mullvad-vpn" + dest: "{{ global_bin }}/mullvad-vpn" + state: link + force: true + +- name: Workstation | Software | VPN | Mullvad | Enable (runit) + ansible.builtin.file: + src: "/{{ runit_script_dir }}/mullvad-daemon" + dest: "/{{ runit_service_dir }}/mullvad" + state: link + force: true + when: ansible_service_mgr == "runit"