If I have a cookbooks directory, a json attributes file, a solo.rb like following
cookbooks directory
cookbooks |-cb_foo | |-attributes | | |-default.rb | |-recipes | |-default.rb | |-cb_bar | |-attributes | | |-default.rb | |-recipes | |-default.rb . . .
json attributes file
{ "run_list": [ "recipe[cb_foo]" ] }
solo.rb
file_cache_path "/path/to/chef-solo" cookbook_path "/path/to/cookbooks"
and if I execute chef-client like
$ sudo -E chef-client -j /path/to/attributes.json
Then, the json attributes file "cb_bar/attributes/default.rb" isn't loaded.
But, if I execute chef-solo like
$ sudo -E chef-solo -c solo.rb -j /path/to/attributes.json
Then, All of attributes files including "cb_bar/attributes/default.rb", are loaded.
I thought that if I use chef-client, chef-client loads only necessary recipes from a chef server to a cache directory, and chef-client see the directory, so, even if chef-client can't understand what files I need, chef-client doesn't load unnecessary recipe attribute files.But if I use chef-solo, chef-solo can see all of recipe attribute files, and that chef-solo can't understand what files I need, so the command loads them.
Is it right?