Jordan Violet Jordan Violet - 1 year ago 58
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?

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download