From e32ab7e5955e09d5c18bd91b6189bc3f8a3ec9d8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Sachse?= <joerg.sachse@slub-dresden.de>
Date: Wed, 7 Sep 2022 11:27:38 +0200
Subject: [PATCH] style: don't compare var value with empty string

---
 tasks/configure_swap.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tasks/configure_swap.yml b/tasks/configure_swap.yml
index 3a6d088..6e7d7db 100644
--- a/tasks/configure_swap.yml
+++ b/tasks/configure_swap.yml
@@ -9,7 +9,7 @@
   ansible.builtin.command: swapoff -va
   when:
     - ansible_hostname is not search("validate")
-    - swap_active.stdout == ""
+    - swap_active.stdout | length == 0
   register: disable_swap
   changed_when: disable_swap.stdout not in "swapoff LABEL=swap"
 
@@ -20,4 +20,4 @@
     state: "absent"
   when:
     - ansible_hostname is not search("validate")
-    - swap_active.stdout == ""
+    - swap_active.stdout | length == 0
-- 
GitLab