How can I do it?
- name: Exit if no pkg update
fail: msg="No new packages for update"
when: (ncs_db_ccm_pkg_update.rc != 100 and ncs_db_common_pkg_update.rc !=
hostvars[groups['server1']]['old_yum_result'] == "0" and
hostvars[groups['server2']]['new_yum_result'] == "0" and
force_upgrade == false and upgrade == true)
Now I use fail: but this is not a good way as the return code is 3 instead
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firstname.lastname@example.org.
To post to this group, send email to email@example.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ed20fc6c-82aa-4f0d-b493-69e1159a2a0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.