vpn, change symlink to a script.
This commit is contained in:
@@ -36,6 +36,7 @@
|
|||||||
|
|
||||||
when: ansible_distribution in ("Debian", "Ubuntu", "Arch", "Artix")
|
when: ansible_distribution in ("Debian", "Ubuntu", "Arch", "Artix")
|
||||||
|
|
||||||
|
## Specific Distros ##
|
||||||
|
|
||||||
- name: Workstation | Software | VPN | Mullvad | Devuan (runit)
|
- name: Workstation | Software | VPN | Mullvad | Devuan (runit)
|
||||||
block:
|
block:
|
||||||
@@ -69,18 +70,29 @@
|
|||||||
when: ansible_pkg_mgr == "apt"
|
when: ansible_pkg_mgr == "apt"
|
||||||
and ansible_service_mgr != "systemd"
|
and ansible_service_mgr != "systemd"
|
||||||
|
|
||||||
|
## Link & Enable ##
|
||||||
|
|
||||||
- name: Workstation | Software | VPN | Mullvad | Symlink GUI
|
- name: Workstation | Software | VPN | Mullvad | PATH | Facts 01
|
||||||
file:
|
set_fact:
|
||||||
src: "/opt/Mullvad VPN/mullvad-vpn"
|
mullvad_exe: 'mullvad-vpn'
|
||||||
dest: "{{ global_bin }}/mullvad-vpn"
|
mullvad_exe_dir: '/opt/Mullvad\ VPN'
|
||||||
state: link
|
|
||||||
force: true
|
- name: Workstation | Software | VPN | Mullvad | PATH | Facts 02
|
||||||
|
set_fact:
|
||||||
|
mullvad_exe_new: "{{ global_bin }}/{{ mullvad_exe }}"
|
||||||
|
|
||||||
|
- name: Workstation | Software | VPN | Mullvad | PATH | Install
|
||||||
|
shell: "{{ item }}"
|
||||||
|
loop:
|
||||||
|
- echo "#!/usr/bin/env sh" > {{ mullvad_exe_new }}
|
||||||
|
- echo "cd {{ mullvad_exe_dir }}" >> {{ mullvad_exe_new }}
|
||||||
|
- echo "./{{ mullvad_exe }}" >> {{ mullvad_exe_new }}
|
||||||
|
- chmod +x {{ mullvad_exe_new }}
|
||||||
|
|
||||||
- name: Workstation | Software | VPN | Mullvad | Enable (runit)
|
- name: Workstation | Software | VPN | Mullvad | Enable (runit)
|
||||||
file:
|
file:
|
||||||
src: "/{{ runit_script_dir }}/mullvad-daemon"
|
src: "{{ runit_script_dir }}/mullvad-daemon"
|
||||||
dest: "/{{ runit_service_dir }}/mullvad"
|
dest: "{{ runit_service_dir }}/mullvad"
|
||||||
state: link
|
state: link
|
||||||
force: true
|
force: true
|
||||||
when: ansible_service_mgr == "runit"
|
when: ansible_service_mgr == "runit"
|
||||||
|
|||||||
Reference in New Issue
Block a user