Puppet: is there a way to catch failure to apply a resource?


is there a way in Puppet to catch a failure when resource is applied, for example, when declaration like

file { '/var/tmp/test': ensure => file, mode => '0755', }

fails, invoke something like

exec { 'Register some failure': command => '/var/tmp/register failure for /var/tmp/test', }



You can try this :

exec { 'Notify a failure' : command => "/var/tmp/register failure for /var/tmp/test", path => "/bin:", subscribe => File["/var/tmp/test"], }


  • Is there a way to define relationships between create_resources
  • Puppet : How to load file from agent - Part 2
  • puppet adding array elements in a loop
  • Install mysql with puppet on vagrant vm
  • passing parameter to server in ExtJs
  • twisted.internet.error.ConnectError when run scrapy spider
  • Extjs, handling success or failure when doing a standard submit in a form
  • How to implement simple validation in Scala
  • Excel passing a range into a function
  • Cythonized function unexpectedly slow
  • Passing parameter through “window.location.href”
  • What is the likely cause of a net::ERR_CONNECTION_ABORTED when uploading a file to Spring
  • Activation Function choice for Neural network
  • What Makes These Two Array Adds Different?
  • Android Studio Can't Find tools.jar
  • NUnit 3.0 TestCase const custom object arguments
  • UWP/C# - Issue with AQS and USB Devices
  • Ensure fsync did its job
  • Converting a WriteableBitmap image ToArray in UWP
  • Reading JSON from a file using C++ REST SDK (Casablanca)
  • Paperclip, set path outside of rails root folder
  • Why value captured by reference in lambda is broken? [duplicate]
  • Display issues when we change from one jquery mobile page to another in firefox
  • Deselecting radio buttons while keeping the View Model in synch
  • javascript inside java/jsp code
  • Shallow update not allowed (git > 1.9)
  • JSON with duplicate key names losing information when parsed
  • Jquery - Jquery Wysiwyg return html as a string
  • Run Powershell script from inside other Powershell script with dynamic redirection to file
  • How to delete a row from a dynamic generate table using jquery?
  • Load html files in TinyMce
  • How can I get HTML syntax highlighting in my editor for CakePHP?
  • using HTMLImports.whenReady not working in chrome
  • coudnt use logback because of log4j
  • Authorize attributes not working in MVC 4
  • EntityFramework adding new object to nested object collection
  • Observable and ngFor in Angular 2
  • How to Embed XSL into XML
  • UserPrincipal.Current returns apppool on IIS
  • Conditional In-Line CSS for IE and Others?