From 46e20669ffecfd20dfc952cd2ae9719bc1931a36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gardais=20J=C3=A9r=C3=A9my?= Date: Wed, 27 Feb 2019 14:11:20 +0100 Subject: [PATCH] Fix E602 Don't compare to empty string --- CHANGELOG.md | 1 + tasks/main.yml | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5328d3c..da54d2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ### Fix * Fix E405 Remote package tasks should have a retry. +* Fix E602 Don't compare to empty string. ## v1.0.1 diff --git a/tasks/main.yml b/tasks/main.yml index b26b60d..31a329a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -20,8 +20,8 @@ deb: '{{ fusioninventory__agent_package_url }}' register: pkg_agent_url_result until: pkg_agent_url_result is success - when: fusioninventory__agent_package_url != "" - and fusioninventory__agent_deploy_state == "present" + when: ((fusioninventory__agent_package_url) and + (fusioninventory__agent_deploy_state == "present")) - name: Ensure fusioninventory-agent package from REPOS package: @@ -30,8 +30,8 @@ else "absent" }}' register: pkg_agent_repo_result until: pkg_agent_repo_result is success - when: fusioninventory__agent_package_url == "" - or fusioninventory__agent_deploy_state == "absent" + when: ((not fusioninventory__agent_package_url) or + (fusioninventory__agent_deploy_state == "absent")) # Manage agent configuration file [[[1 - name: Create Fusioninventory-agent configuration