From 1679eb25220f5052cd9a5056f6415aa185cbc750 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Thu, 30 Jul 2026 13:06:23 -0700 Subject: [PATCH] Change tabs to spaces. --- tasks/workstation/linux/software/vpn.yml | 56 ++++---- tasks/workstation/linux/software/vscodium.yml | 132 +++++++++--------- 2 files changed, 99 insertions(+), 89 deletions(-) diff --git a/tasks/workstation/linux/software/vpn.yml b/tasks/workstation/linux/software/vpn.yml index d376844..ce5a490 100644 --- a/tasks/workstation/linux/software/vpn.yml +++ b/tasks/workstation/linux/software/vpn.yml @@ -1,30 +1,38 @@ --- # Install VPN client(s). -# https://mullvad.net/en/help/install-mullvad-app-linux -- name: Workstation | Software | VPN | Mullvad | Add Repo [apt] - 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 + block: -- name: Workstation | Software | VPN | Mullvad | Add Repo [dnf] - shell: "{{ item }}" - loop: - - sudo dnf config-manager --add-repo https://repository.mullvad.net/rpm/stable/mullvad.repo - when: ansible_pkg_mgr == "dnf" + # https://mullvad.net/en/help/install-mullvad-app-linux -- name: Workstation | Software | VPN | Install - package: - name: - - mullvad-vpn - state: present + - name: Workstation | Software | VPN | Mullvad | Add Repo [apt] + 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] + 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 + package: + name: + - mullvad-vpn + state: present + + - 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 | Symlink GUI - ansible.builtin.file: - src: "/opt/Mullvad VPN/mullvad-vpn" - dest: "{{ global_bin }}/mullvad-vpn" - state: link - force: true + when: ansible_distribution in ("Debian", "Ubuntu", "Arch", "Artix") + +# TBD: VPNs for distros like Devuan. diff --git a/tasks/workstation/linux/software/vscodium.yml b/tasks/workstation/linux/software/vscodium.yml index c99e75e..630b9a6 100644 --- a/tasks/workstation/linux/software/vscodium.yml +++ b/tasks/workstation/linux/software/vscodium.yml @@ -7,70 +7,72 @@ # This also exists but was not utilized: # https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo -## Facts ## +- name: Workstation | Linux | Software | VS Codium + block: + + ## Facts ## + + # Paths + + - name: Workstation | Linux | Software | VS Codium | Facts + set_fact: + vscodium_source_list: "/etc/apt/sources.list.d/vscodium.list" + vscodium_keyfile: "/usr/share/keyrings/vscodium.gpg" + + # Checks + + - name: Workstation | Linux | Software | VS Codium | Check PPA + stat: + path: "{{ vscodium_source_list }}" + get_attributes: false + get_checksum: false + get_mime: false + register: vscodium_source_exists + + ## Install Repo ## + + - name: Workstation | Linux | Software | VS Codium | Add PPA + shell: "{{ item }}" + loop: + - "wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg \ + | gpg --dearmor \ + | sudo tee {{ vscodium_keyfile }} > /dev/null" + - "echo 'deb [arch=amd64,arm64 signed-by={{ vscodium_keyfile }}] https://download.vscodium.com/debs vscodium main' \ + | sudo tee {{ vscodium_source_list }}" + - "sudo apt update" + when: coding == true + and not vscodium_source_exists.stat.exists + + ## Install Package ## + + - name: Workstation | Linux | Software | VS Codium | Install + package: + name: + - codium + state: present + when: ansible_pkg_mgr == "apt" + and coding == true + + ## Remove Package ## + + - name: Workstation | Linux | Software | VS Codium | Uninstall + package: + name: + - codium + state: absent + when: coding != true + + ## Remove Repo ## + + - name: Workstation | Linux | Software | VS Codium | Remove PPA + shell: "{{ item }}" + loop: + - "mv {{ vscodium_source_list }} ~/TRASH/" + - "mv /etc/apt/keyrings/vscodium*.gpg ~/TRASH/" + - "sudo apt update" + when: coding != true + and vscodium_source_exists.stat.exists -# Paths - -- name: Workstation | Linux | Software | VS Codium | Facts - set_fact: - vscodium_source_list: "/etc/apt/sources.list.d/vscodium.list" - vscodium_keyfile: "/usr/share/keyrings/vscodium.gpg" when: ansible_pkg_mgr == "apt" - -# Checks - -- name: Workstation | Linux | Software | VS Codium | Check PPA - stat: - path: "{{ vscodium_source_list }}" - get_attributes: false - get_checksum: false - get_mime: false - register: vscodium_source_exists - when: ansible_pkg_mgr == "apt" - -## Install Repo ## - -- name: Workstation | Linux | Software | VS Codium | Add PPA - shell: "{{ item }}" - loop: - - "wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg \ - | gpg --dearmor \ - | sudo tee {{ vscodium_keyfile }} > /dev/null" - - "echo 'deb [arch=amd64,arm64 signed-by={{ vscodium_keyfile }}] https://download.vscodium.com/debs vscodium main' \ - | sudo tee {{ vscodium_source_list }}" - - "sudo apt update" - when: ansible_pkg_mgr == "apt" - and coding == true - and not vscodium_source_exists.stat.exists - -## Install Package ## - -- name: Workstation | Linux | Software | VS Codium | Install - package: - name: - - codium - state: present - when: ansible_pkg_mgr == "apt" - and coding == true - -## Remove Package ## - -- name: Workstation | Linux | Software | VS Codium | Uninstall - package: - name: - - codium - state: absent - when: ansible_pkg_mgr == "apt" - and coding != true - -## Remove Repo ## - -- name: Workstation | Linux | Software | VS Codium | Remove PPA - shell: "{{ item }}" - loop: - - "mv {{ vscodium_source_list }} ~/TRASH/" - - "mv /etc/apt/keyrings/vscodium*.gpg ~/TRASH/" - - "sudo apt update" - when: ansible_pkg_mgr == "apt" - and coding != true - and vscodium_source_exists.stat.exists + and ansible_distribution in ("Debian", "Ubuntu") +