From 2917e324984341e26af3f7d7e2ac1bbc1be1c780 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Fri, 2 Oct 2026 07:48:55 -0700 Subject: [PATCH] codium, fix boolean comparisons. --- tasks/workstation/linux/software/vscodium.yml | 35 +++++++++---------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/tasks/workstation/linux/software/vscodium.yml b/tasks/workstation/linux/software/vscodium.yml index 630b9a6..d45ff1c 100644 --- a/tasks/workstation/linux/software/vscodium.yml +++ b/tasks/workstation/linux/software/vscodium.yml @@ -9,18 +9,18 @@ - 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 }}" @@ -28,9 +28,9 @@ get_checksum: false get_mime: false register: vscodium_source_exists - + ## Install Repo ## - + - name: Workstation | Linux | Software | VS Codium | Add PPA shell: "{{ item }}" loop: @@ -40,39 +40,38 @@ - "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 + when: coding 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 - + and coding + ## Remove Package ## - + - name: Workstation | Linux | Software | VS Codium | Uninstall package: name: - codium state: absent - when: coding != true - + when: ! coding + ## 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 + when: ! coding and vscodium_source_exists.stat.exists when: ansible_pkg_mgr == "apt" and ansible_distribution in ("Debian", "Ubuntu") -