Is there any way to exit playbook explicitly (short-circuit) with success?

Hi everyone,

I noticed that there is an explicit fail module, but is there an explicit short-circuit success in ansible?
Or is it always necessary (I understand that it’s not preferred) to write playbooks that execute everything and are idempotent?

I am trying to throw together a quick prototype for my project and would rather avoid the upfront cost of refactoring for my intents and purposes.

You can use raw module to call /bin/true

Actually. I misread what you were asking. I think tags is what you are after. Let’s you run sections of a playbook. So it exits when done.

you can:

fail:
when: registered|success

That’s going to make ansible-playbook exit with non-zero code, right? No way to exit gracefully?

no current method, IIRC there is a feature request to add this to fail