red888
red888

Reputation: 31662

Where are the node objects stored on the node's local file system?

I reading this doc and it s

The chef-client pulls down the node object from the Chef server. If this is the first chef-client run for the node, there will not be a node object to pull down from the Chef server. After the node object is pulled down from the Chef server, the chef-client rebuilds the node object. If this is the first chef-client run for the node, the rebuilt node object will contain only the default run-list. For any subsequent chef-client run, the rebuilt node object will also contain the run-list from the previous chef-client run.

The node must store the node object (json file) locally somewhere right? I look in C:\chef\cache on one of my nodes and I don't see it.

Is there somewhere on the nodes' file systems where these node objects are stored/cached?

Upvotes: 0

Views: 502

Answers (1)

lamont
lamont

Reputation: 3974

No it is only stored in memory.

You can extract it yourself via something like:

file Chef::Config[:file_cache_path] + "/node.json" do
  content Chef::JSONCompat.to_json_pretty(node.to_hash)
end

Upvotes: 1

Related Questions