Chef client exit intentionally


Say I am explicitly aborting chef-client with exit 1 and in resource handling the same with return property.
The message i see is :- Chef client exit with 1 but expected 0…
Now I want that instead of this message I can append some more message…Is there any way for this ?


There ideally should not be a situation where you are using “exit 1” to fail a Chef Client run. Instead, you should probably be using raise "Some error message here", like this example:

if node['os'] == 'linux'
  raise "This cookbook does not support Linux"