Commands:
ls
cd cookbooks
ls cd test-cookbook
ls
tree
clear
cd ..
vi test-cookbook/recipes/test-recipe.rb
execute "run a script" do
command <<-EOH
mkdir /rajputdir
touch /rajputfile
EOH
end
chef exec ruby -c test-cookbook/recipes/test-recipe.rb
chef-client -zr “recipe[test-cookbook::test-recipe]”
ls /
chef-client -zr “recipe[test-cookbook::test-recipe]”
> It will execute as the code contains linux command so, it will execute each & every time we use this command, thats the draw-back of using linux commands inside Ruby code