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:
|
name:
|
||||||
- mullvad-vpn-runit
|
- mullvad-vpn-runit
|
||||||
state: present
|
state: present
|
||||||
when: ansible_distribution == "Artix"
|
when: ansible_pkg_mgr == "pacman"
|
||||||
and ansible_service_mgr == "runit"
|
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")
|
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:
|
block:
|
||||||
|
|
||||||
- name: Workstation | Software | VPN | Mullvad | Devuan Block | Facts 01
|
- name: Workstation | Software | VPN | Mullvad | Devuan | Facts 01
|
||||||
set_fact:
|
set_fact:
|
||||||
devuan_mullvad_dir: ~/Downloads/mullvad-installer
|
devuan_mullvad_dir: ~/Downloads/mullvad-installer
|
||||||
mullvad_deb_url: https://mullvad.net/en/download/app/deb/latest
|
mullvad_deb_url: https://mullvad.net/en/download/app/deb/latest
|
||||||
mullvad_repack_url: https://github.com/sys-fs/mullvad-repack
|
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:
|
set_fact:
|
||||||
mullvad_repack_dir: "{{ devuan_mullvad_dir }}/mullvad_repack"
|
mullvad_repack_dir: "{{ devuan_mullvad_dir }}/mullvad_repack"
|
||||||
|
|
||||||
- name: Workstation | Software | VPN | Mullvad | Devuan Block | Check
|
- name: Workstation | Software | VPN | Mullvad | Devuan | Check
|
||||||
stat:
|
stat:
|
||||||
path: "/opt/Mullvad VPN"
|
path: "/opt/Mullvad VPN"
|
||||||
register: mullvad_installed
|
register: mullvad_installed
|
||||||
|
|
||||||
- name: Workstation | Software | VPN | Mullvad | Devuan Block | Install
|
- name: Workstation | Software | VPN | Mullvad | Devuan | Install
|
||||||
shell: "{{ item }}"
|
shell: "{{ item }}"
|
||||||
loop:
|
loop:
|
||||||
- "mkdir -pv {{ devuan_mullvad_dir }}"
|
- "mkdir -pv {{ devuan_mullvad_dir }}"
|
||||||
@@ -85,3 +69,18 @@
|
|||||||
when: ansible_pkg_mgr == "apt"
|
when: ansible_pkg_mgr == "apt"
|
||||||
and ansible_service_mgr != "systemd"
|
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