Chef handler provoke script


#1

Is there a way to call other script when chef handler gets activated?


#2

I am not sure what you requirement is, but read this page: https://docs.chef.io/handlers.html

If want to run custom scripts as part of an event handler then yes you can do that like this:

Chef.event_handler do
  on :run_failed do |exception|
    <ruby code here>
  end
end
  

This will do something when chef run fails. You can put this inside a recipe and hook it on top of your run list.