How to get puppet to stop on the first error in a Manifest?

Solution 1:

This is not possible with puppet. The puppet master will build the graph with what needs to be done. Puppet will start executing the graphs nodes. If one node fails, all dependent nodes will fail also. Everything else gets executed.

Stages are the same: if anything goes wrong in a stage, all dependent stages will automatically fail.

Solution 2:

See the official documentation of the puppet function "fail".

Here is an example:

fail{'here goes your message':}