diff --git a/playbooks/leapp_preupgrade_ansible.yml b/playbooks/leapp_preupgrade_ansible.yml index 1c9001b..d270574 100644 --- a/playbooks/leapp_preupgrade_ansible.yml +++ b/playbooks/leapp_preupgrade_ansible.yml @@ -218,9 +218,9 @@ - name: Set message if inhibitors or errors present set_fact: message: >- - "The upgrade cannot proceed. Your system has {{ error_count + inhibitor_count }} inhibitor{{ 's' if inhibitor_count + error_count != 1 else '' }} + "The upgrade cannot proceed. Your system has {{ error_count | int + inhibitor_count | int }} inhibitor{{ 's' if inhibitor_count | int + error_count | int != 1 else '' }} out of {{ total_problems_count }} potential problems." - when: inhibitor_count != 0 or error_count != 0 + when: inhibitor_count != "0" or error_count != "0" - name: Set message if no inhibitors and no errors present @@ -228,7 +228,7 @@ message: >- {{ 'No problems found. The system is ready for upgrade.' if total_problems_count == 0 else 'The upgrade can proceed. However, there is one or more warnings about issues that might occur after the upgrade.'}} - when: inhibitor_count == 0 and error_count == 0 + when: inhibitor_count == "0" and error_count == "0" - name: Set result ansible.builtin.set_fact: diff --git a/playbooks/leapp_upgrade_ansible.yml b/playbooks/leapp_upgrade_ansible.yml index 7826f31..79580c5 100644 --- a/playbooks/leapp_upgrade_ansible.yml +++ b/playbooks/leapp_upgrade_ansible.yml @@ -223,7 +223,7 @@ set_fact: message: >- "The upgrade cannot proceed. - Your system has {{ error_count + inhibitor_count }} inhibitor{{ 's' if inhibitor_count + error_count != 1 else '' }} + Your system has {{ error_count | int + inhibitor_count | int }} inhibitor{{ 's' if inhibitor_count | int + error_count | int != 1 else '' }} out of {{ total_problems_count }} potential problems." - name: Set message if leapp upgrade succeeded