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