2

When I run chef-solo without specifying the -c solo.rb parameter, it throws a warning

[2015-06-25T14:53:04-04:00] WARN: *****************************************
[2015-06-25T14:53:04-04:00] WARN: Did not find config file: /etc/chef/solo.rb, using command line options.
[2015-06-25T14:53:04-04:00] WARN: *****************************************

Presumably it's looking for a system solo.rb file because I didn't specify one explicitly.

I also have a .chef/knife.rb file available.

  1. What's the difference between the solo.rb and knife.rb files? They seem to have the exact same info defined - cookbook_path, file_cache_path, log_level, etc.. - so it seems redundant
  2. Does chef-solo ever look for and use my knife.rb file? It's looking all over the place for a solo.rb file, and was wondering if it ever falls back to searching the default .chef/knife.rb file.

Thanks!

user2490003
  • 10,706
  • 17
  • 79
  • 155
  • 2
    The knife.rb file is used for the knife command. Knife is an admin tool for controlling a chef server, so completely unrelated to chef solo. – Mark O'Connor Jun 25 '15 at 20:00
  • gotcha. So if I have the exact same content in both can I consolidate everything into my `knife.rb` file and then point `chef-solo` to just use the `knife.rb` file as a config file? Or is that bad practice? – user2490003 Jun 25 '15 at 20:21
  • 1
    That will work. But chef solo is getting a bit out of date. Check out the "local mode" capability now in chef client. (see the -z option). Uses an embedded instance of chef server. – Mark O'Connor Jun 25 '15 at 20:34
  • To get rid of the warning, specify the full path for solo.rb if you are indeed passing the `-c` flag – Neo Sep 04 '17 at 06:07

0 Answers0