+1 here; having ansible-playbook return a 0 exit code when tasks fail make
automating with a CI server more difficult then it has to be.
On Friday, January 10, 2014 at 11:01:36 AM UTC-8, Mike Bain wrote:
>
> +1 Having an option for ansible to return an exit code if a task fails
> would be good for us. We also have automated ansible scripts and rely on
> exit codes to know if the ansible commands worked or not.
>
> I think of ansible as being great tool to run a users tasks. From this
> user centric point of view when a task fails the whole process has failed,
> even if technically ansible itself hasn't actually failed. I do care if
> ansible fails, and also care if one of my tasks fails.
>
> The current ansible return code setup feels like a browser not showing me
> an error response because it handled the web servers error correctly.
>
> Currently, to get a non zero exit code on ansible task failures I pipe the
> ansible output into perl:
>
> ansible-playbook <options> | perl -pe 'END { exit $status } $status=1 if
> /FAILED:|Failed:/;'
>
> Cheers
>
> Mike
>
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/82a11893-1574-4d5c-b02d-4d382d0f5357%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.