Jordan Violet Jordan Violet - 5 months ago 6
Ruby Question

Is it possible to access Chef in Ruby outside of a cookbook/recipe?

I am looking to have a ruby script on my Chef workstation that would use the Chef ruby gem and would be able to access data bags on its own, without being a cookbook or recipe.

Are you able to do this?


To add to Stephen's answer/comment, check out knife exec for simple one-liners. It is usually easier to get going than chef-api.