vpn, symlink the command for all systems and move the runit enable outside the distro block.
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user