From 1fe440aabe2735cb2318ccc5f2f9e8d764944d5b Mon Sep 17 00:00:00 2001 From: Solal Nathan Date: Tue, 16 Feb 2021 15:42:10 +0100 Subject: [PATCH] :rotating_light: fix empty-string-compare --- utils/reboot_needed_check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/reboot_needed_check.yml b/utils/reboot_needed_check.yml index cf7868f..631d496 100755 --- a/utils/reboot_needed_check.yml +++ b/utils/reboot_needed_check.yml @@ -20,7 +20,7 @@ - name: DEBUG debug: msg: "{{ ansible_facts['nodename'] }} : {{ result.stdout }}" - when: result.stdout != "" + when: result.stdout is defined # Add info line by line - name: Dump all info into the local file @@ -28,4 +28,4 @@ lineinfile: path: /tmp/ansible_dump_reboot_needed.txt line: "{{ ansible_facts['nodename'] }} : {{ result.stdout }}" - when: result.stdout != "" + when: result.stdout is defined