Dropping data from hash file bags or node data into a separate file is a good way to exchange information between the Chef server and scripts running on the node. If your script can parse JSON, then this is really easy:
file "/etc/script.json" do owner "root" group "root" mode 0644 content node[:whatever].to_json end
Using the chef's REST interface sounds like overkill, and groping in / var / cache / chef is just rude. (-:
Tim potter
source share