continuous integration - Abort Chef recipe at run time not during compilation -


I want to override a recipe at run time based on a certain condition, but raise Use or Chef :: application.fatal! As I mentioned in this post, my recipe is coming out at compiling time.

Here's what I'm trying to do (a part of my script): ['ARAP'] ['DIRE'] command "SOME" "{{result}" node.default ['success' ] = "Execute" incorrect "notification:" ruby_block [jobFailure] ",: no delay" CD # {node ['ABC'] ['dir']} & amp; amp; amp; amp; Order & gt; & gt; # {results} "End ruby_block" Job failure exits "Raise raise" script because the job has failed "if (node. [Default] 'success'] ==" wrong ") verb : Nothing ends

I am getting this error while running the above script because the chef is just getting at the compile time when giving an error below:

  Running handler: [2014-10-27 T17: 17: 03 + 00: 00] Error: Running Exceptions Run Dealer Running Handler Full [2014-10-27 T17: 17: 03 + 00: 00] Error: Exception Handler Full [2014-10-27T17: 17: 03 + 00: 00] FATAL: Stacktrace was thrown for C / User / Mennish .a.joshi / .chef / local-mode-cache / cache / chef-stacktrace.out Chef client failed. 0 resources updated in 12.400772 seconds [2014-10-27 T17: 17: 03 + 00: 00] FATAL: Runtime error: Job has failed as a script exit  

Can anyone tell me if there is only one way to execute the command on a condition basis?

T works like this and hopefully this code will not work as you expect , But you have to put the code in the actual block for ruby_block: blocking the "jobFailure" ruby_block "jobFailure" function has failed "if the node (default. Success'] == "wrong") End action: nothing

node.default ['success'] = "wrong" that you have executed The order of the status of the order in the resource Wow without compilation will be on time. Do not return the value of such cook resources.


Comments