Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
max_failed_percentage exit 0 #4407
max_failed_percentage always sends a non zero exit status even if the percentage is not exceed.
--- - hosts: app-pool gather_facts: False user: dominis serial: 32 max_fail_percentage: 50 tasks: - action: ping
I don't think this should be the same as this:
--- - hosts: app10.bfc.kinja-ops.com gather_facts: False user: dominis tasks: - action: ping
In the above you have set max_failure_percentage to 50% and you have had one failure.
So yes, it's doing the right thing in going on -- but I can see what you mean about having a nice way to make sure this failure shows up in Jenkins.
Perhaps we should set a global flag and if we would have returned 0 and that flag is set, we can return a new exit code that we have previously unused (like, I believe, 4) and print a message at the bottom.
This is a very good idea, so I'm tagging this as a priority feature request.
added a commit
Mar 21, 2014
Max fail percentage was only intended to abort the play if the threshold was reached, but has never been a way to alter the final exit code and override detected host failure/unreachable. We are going to keep that behavior as is, because a change could be very confusing for users who rely on the exit code 0 to mean a perfect execution.