vpn, fix lint issues besides shell changed_when.
This commit is contained in:
@@ -4,35 +4,35 @@
|
|||||||
- name: Workstation | Software | VPN | Mullvad
|
- name: Workstation | Software | VPN | Mullvad
|
||||||
block:
|
block:
|
||||||
|
|
||||||
# https://mullvad.net/en/help/install-mullvad-app-linux
|
# https://mullvad.net/en/help/install-mullvad-app-linux
|
||||||
|
|
||||||
- name: Workstation | Software | VPN | Mullvad | Add Repo [apt]
|
- name: Workstation | Software | VPN | Mullvad | Add Repo [apt]
|
||||||
ansible.builtin.shell: "{{ item }}"
|
ansible.builtin.shell: "{{ item }}"
|
||||||
loop:
|
loop:
|
||||||
- sudo curl -fsSLo /usr/share/keyrings/mullvad-keyring.asc https://repository.mullvad.net/deb/mullvad-keyring.asc
|
- sudo curl -fsSLo /usr/share/keyrings/mullvad-keyring.asc https://repository.mullvad.net/deb/mullvad-keyring.asc
|
||||||
- echo "deb [signed-by=/usr/share/keyrings/mullvad-keyring.asc arch=$( dpkg --print-architecture )] https://repository.mullvad.net/deb/stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/mullvad.list
|
- echo "deb [signed-by=/usr/share/keyrings/mullvad-keyring.asc arch=$( dpkg --print-architecture )] https://repository.mullvad.net/deb/stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/mullvad.list
|
||||||
- apt update
|
- apt update
|
||||||
when: ansible_pkg_mgr == "apt"
|
when: ansible_pkg_mgr == "apt"
|
||||||
|
|
||||||
- name: Workstation | Software | VPN | Mullvad | Add Repo [dnf]
|
- name: Workstation | Software | VPN | Mullvad | Add Repo [dnf]
|
||||||
ansible.builtin.shell: "{{ item }}"
|
ansible.builtin.shell: "{{ item }}"
|
||||||
loop:
|
loop:
|
||||||
- sudo dnf config-manager --add-repo https://repository.mullvad.net/rpm/stable/mullvad.repo
|
- sudo dnf config-manager --add-repo https://repository.mullvad.net/rpm/stable/mullvad.repo
|
||||||
when: ansible_pkg_mgr == "dnf"
|
when: ansible_pkg_mgr == "dnf"
|
||||||
|
|
||||||
- name: Workstation | Software | VPN | Install
|
- name: Workstation | Software | VPN | Install
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name:
|
name:
|
||||||
- mullvad-vpn
|
- mullvad-vpn
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Workstation | Software | VPN | Install (Artix, runit)
|
- name: Workstation | Software | VPN | Install (Artix, runit)
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name:
|
name:
|
||||||
- mullvad-vpn-runit
|
- mullvad-vpn-runit
|
||||||
state: present
|
state: present
|
||||||
when: ansible_pkg_mgr == "pacman"
|
when: ansible_pkg_mgr == "pacman"
|
||||||
and ansible_service_mgr == "runit"
|
and ansible_service_mgr == "runit"
|
||||||
|
|
||||||
when: ansible_distribution in ("Debian", "Ubuntu")
|
when: ansible_distribution in ("Debian", "Ubuntu")
|
||||||
or ansible_pkg_mgr in ("pacman", "dnf")
|
or ansible_pkg_mgr in ("pacman", "dnf")
|
||||||
@@ -42,31 +42,31 @@
|
|||||||
- name: Workstation | Software | VPN | Mullvad | Devuan (runit)
|
- name: Workstation | Software | VPN | Mullvad | Devuan (runit)
|
||||||
block:
|
block:
|
||||||
|
|
||||||
- name: Workstation | Software | VPN | Mullvad | Devuan | Facts 01
|
- name: Workstation | Software | VPN | Mullvad | Devuan | Facts 01
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
devuan_mullvad_dir: "{{ global_src }}/mullvad-installer"
|
devuan_mullvad_dir: "{{ global_src }}/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 | Facts 02
|
- name: Workstation | Software | VPN | Mullvad | Devuan | Facts 02
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
mullvad_repack_dir: "{{ devuan_mullvad_dir }}/mullvad_repack"
|
mullvad_repack_dir: "{{ devuan_mullvad_dir }}/mullvad_repack"
|
||||||
|
|
||||||
- name: Workstation | Software | VPN | Mullvad | Devuan | Check
|
- name: Workstation | Software | VPN | Mullvad | Devuan | Check
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: '/opt/Mullvad VPN'
|
path: '/opt/Mullvad VPN'
|
||||||
register: mullvad_installed
|
register: mullvad_installed
|
||||||
|
|
||||||
- name: Workstation | Software | VPN | Mullvad | Devuan | Install
|
- name: Workstation | Software | VPN | Mullvad | Devuan | Install
|
||||||
ansible.builtin.shell: "{{ item }}"
|
ansible.builtin.shell: "{{ item }}"
|
||||||
loop:
|
loop:
|
||||||
- "mkdir -pv {{ devuan_mullvad_dir }}"
|
- "mkdir -pv {{ devuan_mullvad_dir }}"
|
||||||
- "curl -L -o {{ devuan_mullvad_dir }}/Mullvad.deb {{ mullvad_deb_url }}"
|
- "curl -L -o {{ devuan_mullvad_dir }}/Mullvad.deb {{ mullvad_deb_url }}"
|
||||||
- "rm -rfv {{ mullvad_repack_dir }}"
|
- "rm -rfv {{ mullvad_repack_dir }}"
|
||||||
- "git clone {{ mullvad_repack_url }} {{ mullvad_repack_dir }}"
|
- "git clone {{ mullvad_repack_url }} {{ mullvad_repack_dir }}"
|
||||||
- "cd {{ mullvad_repack_dir }} && ./repack.sh ../Mullvad.deb"
|
- "cd {{ mullvad_repack_dir }} && ./repack.sh ../Mullvad.deb"
|
||||||
- "apt-get install -y --reinstall {{ devuan_mullvad_dir }}/Mullvad_repack.deb"
|
- "apt-get install -y --reinstall {{ devuan_mullvad_dir }}/Mullvad_repack.deb"
|
||||||
when: not mullvad_installed.stat.exists
|
when: not mullvad_installed.stat.exists
|
||||||
|
|
||||||
when: ansible_pkg_mgr == "apt"
|
when: ansible_pkg_mgr == "apt"
|
||||||
and ansible_service_mgr != "systemd"
|
and ansible_service_mgr != "systemd"
|
||||||
@@ -119,4 +119,5 @@
|
|||||||
- mullvad auto-connect set on
|
- mullvad auto-connect set on
|
||||||
- mullvad lockdown-mode set on
|
- mullvad lockdown-mode set on
|
||||||
- mullvad beta-program set off
|
- mullvad beta-program set off
|
||||||
|
become: true
|
||||||
become_user: "{{ user }}"
|
become_user: "{{ user }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user