Article 5KMB9 Chef Handlers - add run_list on failed recipe run

Chef Handlers - add run_list on failed recipe run

by
keif
from LinuxQuestions.org on (#5KMB9)
Hello, I am encountering an issue running a chef role for a new install.

When I run the role, sometimes an Ubuntu service is running or some other issue and this causes the run to fail. When the run fails, the chef-client it ran on does not get the role and run_list from the role assigned to it when I check the node on the chef server (since the run failed, assigning the role to the node fails too).

I need to find a way to run the recipes in the role so that even if there is an error, the role and run_list gets assigned to the client.

Also, I need to find a way that if a fail occurs, the remaining recipes that were on the run_list continue. Right now if one recipe fails, the whole run_list stops.

I have been able to "trick" chef with deliberate exit code 0 so that it thinks the recipe succeeds and the recipes continue (aka a terrible solution :-)

If anyone has solved this sort of thing, especially with handlers of some sort, then any advice would be appreciated. Thanks, Keithlatest?d=yIl2AUoC8zA latest?i=1Sxlls24PE0:6zRfiIY5Urk:F7zBnMy latest?i=1Sxlls24PE0:6zRfiIY5Urk:V_sGLiP latest?d=qj6IDK7rITs latest?i=1Sxlls24PE0:6zRfiIY5Urk:gIN9vFw1Sxlls24PE0
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments