+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].
For more options, visit https://groups.google.com/groups/opt_out.