From bd181de2c9e8cf854c59e2498d7733cd347d5999 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Fri, 9 Oct 2026 16:47:59 -0700 Subject: [PATCH] vpn, fix lint issues besides shell changed_when. --- tasks/workstation/linux/software/vpn.yml | 95 ++++++++++++------------ 1 file changed, 48 insertions(+), 47 deletions(-) diff --git a/tasks/workstation/linux/software/vpn.yml b/tasks/workstation/linux/software/vpn.yml index c59af43..5ab0974 100644 --- a/tasks/workstation/linux/software/vpn.yml +++ b/tasks/workstation/linux/software/vpn.yml @@ -4,35 +4,35 @@ - name: Workstation | Software | VPN | Mullvad 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] - ansible.builtin.shell: "{{ item }}" - loop: - - 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 - - apt update - when: ansible_pkg_mgr == "apt" + - name: Workstation | Software | VPN | Mullvad | Add Repo [apt] + ansible.builtin.shell: "{{ item }}" + loop: + - 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 + - apt update + when: ansible_pkg_mgr == "apt" - - name: Workstation | Software | VPN | Mullvad | Add Repo [dnf] - ansible.builtin.shell: "{{ item }}" - loop: - - sudo dnf config-manager --add-repo https://repository.mullvad.net/rpm/stable/mullvad.repo - when: ansible_pkg_mgr == "dnf" + - name: Workstation | Software | VPN | Mullvad | Add Repo [dnf] + ansible.builtin.shell: "{{ item }}" + loop: + - sudo dnf config-manager --add-repo https://repository.mullvad.net/rpm/stable/mullvad.repo + when: ansible_pkg_mgr == "dnf" - - name: Workstation | Software | VPN | Install - ansible.builtin.package: - name: - - mullvad-vpn - state: present + - name: Workstation | Software | VPN | Install + ansible.builtin.package: + name: + - mullvad-vpn + state: present - - name: Workstation | Software | VPN | Install (Artix, runit) - ansible.builtin.package: - name: - - mullvad-vpn-runit - state: present - when: ansible_pkg_mgr == "pacman" - and ansible_service_mgr == "runit" + - name: Workstation | Software | VPN | Install (Artix, runit) + ansible.builtin.package: + name: + - mullvad-vpn-runit + state: present + when: ansible_pkg_mgr == "pacman" + and ansible_service_mgr == "runit" when: ansible_distribution in ("Debian", "Ubuntu") or ansible_pkg_mgr in ("pacman", "dnf") @@ -42,31 +42,31 @@ - name: Workstation | Software | VPN | Mullvad | Devuan (runit) block: - - name: Workstation | Software | VPN | Mullvad | Devuan | Facts 01 - ansible.builtin.set_fact: - devuan_mullvad_dir: "{{ global_src }}/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 | Facts 01 + ansible.builtin.set_fact: + devuan_mullvad_dir: "{{ global_src }}/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 | Facts 02 - ansible.builtin.set_fact: - mullvad_repack_dir: "{{ devuan_mullvad_dir }}/mullvad_repack" + - name: Workstation | Software | VPN | Mullvad | Devuan | Facts 02 + ansible.builtin.set_fact: + mullvad_repack_dir: "{{ devuan_mullvad_dir }}/mullvad_repack" - - name: Workstation | Software | VPN | Mullvad | Devuan | Check - ansible.builtin.stat: - path: '/opt/Mullvad VPN' - register: mullvad_installed + - name: Workstation | Software | VPN | Mullvad | Devuan | Check + ansible.builtin.stat: + path: '/opt/Mullvad VPN' + register: mullvad_installed - - name: Workstation | Software | VPN | Mullvad | Devuan | Install - ansible.builtin.shell: "{{ item }}" - loop: - - "mkdir -pv {{ devuan_mullvad_dir }}" - - "curl -L -o {{ devuan_mullvad_dir }}/Mullvad.deb {{ mullvad_deb_url }}" - - "rm -rfv {{ mullvad_repack_dir }}" - - "git clone {{ mullvad_repack_url }} {{ mullvad_repack_dir }}" - - "cd {{ mullvad_repack_dir }} && ./repack.sh ../Mullvad.deb" - - "apt-get install -y --reinstall {{ devuan_mullvad_dir }}/Mullvad_repack.deb" - when: not mullvad_installed.stat.exists + - name: Workstation | Software | VPN | Mullvad | Devuan | Install + ansible.builtin.shell: "{{ item }}" + loop: + - "mkdir -pv {{ devuan_mullvad_dir }}" + - "curl -L -o {{ devuan_mullvad_dir }}/Mullvad.deb {{ mullvad_deb_url }}" + - "rm -rfv {{ mullvad_repack_dir }}" + - "git clone {{ mullvad_repack_url }} {{ mullvad_repack_dir }}" + - "cd {{ mullvad_repack_dir }} && ./repack.sh ../Mullvad.deb" + - "apt-get install -y --reinstall {{ devuan_mullvad_dir }}/Mullvad_repack.deb" + when: not mullvad_installed.stat.exists when: ansible_pkg_mgr == "apt" and ansible_service_mgr != "systemd" @@ -119,4 +119,5 @@ - mullvad auto-connect set on - mullvad lockdown-mode set on - mullvad beta-program set off + become: true become_user: "{{ user }}"