| Note puppet will exit with 0, because from its perspective, it applied the entire catalog. To differentiate between "all resources were applied successfully" vs "at least one resource failed" you must use --detailed-exitcodes as Mikhail mentioned. See PUP-2754 for more history on that. Alternatively, it is possible to write a custom function to conditionally add a deferred resource that fails a notify, like [~henrik] mentioned. Adding a parameter like failure => true to the notify resource is also possible, but you're still going to need to write a custom function to conditionally set the parameter if the catalog's classes are empty. But then you could just as add a deferred err function like Henrik Lindberg suggested. As a result, we don't have plans to add this to the core notify resource. Please reach out to your TAM to see about getting a custom type or function implemented to solve your use case. |