You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
I have an ansible script, and i want to exit 0 if some condition is met. 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 != 100 and hostvars[groups['server1'][0]]['old_yum_result'] == "0" and hostvars[groups['server2'][0]]['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 of 0.