From cbd2f38da095213628254ca210379db80f758164 Mon Sep 17 00:00:00 2001 From: Jose Date: Sat, 14 Feb 2026 08:39:57 +0100 Subject: [PATCH] =?UTF-8?q?refactor=20=E2=99=BB=EF=B8=8F:=20Convert=20stri?= =?UTF-8?q?ng=20to=20boolean=20for=20condition=20and=20changed=5Fwhen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refactored the code to convert string values to boolean for conditional checks and update the `changed_when` attribute accordingly. --- tasks/swap.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks/swap.yml b/tasks/swap.yml index 70aee77..adf3fb2 100644 --- a/tasks/swap.yml +++ b/tasks/swap.yml @@ -16,7 +16,8 @@ when: - proxmox_disable_swap - ansible_memtotal_mb >= proxmox_min_ram_mb_for_no_swap - - active_swaps.stdout != "" + - active_swaps.stdout | bool + changed_when: active_swaps.stdout | bool - name: swap | Comment swap entries in fstab ansible.builtin.replace: