On Mon, 02 Feb 2015 16:15 -0800, Robb Wagoner <[email protected]> wrote: > I have a condition under which I need Ansible to exit without an error > (i.e. sys.exit(0)). Is there a means by which to do this? I.e. the > complement to the *fail* module.
That's curious situation. Perhaps you can call ansible this way so the result of the subshell is always success? $(ansible-playbook play.yml; exit 0); echo $? 0 After a quick look in the plugins code I don't see a way to hook into Ansible and change the exit code. If you want to mess with the code directly, edit ansible-playbook and change the return code in case of errors. However, it's a non-standard change you'll have to keep track of between updates. Giovanni -- 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/1422959987.3338499.222407017.0AFABD93%40webmail.messagingengine.com. For more options, visit https://groups.google.com/d/optout.
