you can use shell out mixin in chef. please see chef\mixin\shell_out.rb