ansible-collections / ansible-consul

:satellite: Ansible role for Hashicorp Consul clusters
https://galaxy.ansible.com/ansible-community/consul/
BSD 2-Clause "Simplified" License
452 stars 313 forks source link

Use "is failed" instead of comparing result code #479

Closed nre-ableton closed 2 years ago

nre-ableton commented 2 years ago

This syntax is a bit more robust and can handle the cases where the task fails with return codes other than 1. It should also handle the following error which can occur if the task fails for other reasons:

The conditional check 'is_unzip_installed.rc == 1' failed. The error
was: error while evaluating conditional (is_unzip_installed.rc == 1):
'dict object' has no attribute 'rc'