1

I'm stumped. I want to change the cache location. The default is in the user profile temp folder; it makes for a VERY long path on Windows. I have looked over all the docs; and I can't seem to figure this out.

Here I see that I can specify client.rb settings on the chef-solo provisioner. and here I see that the cache path is a setting in the client.rb specified by cache_path. This leads me to believe that I should be able to:

provisioner:
  name: chef_solo
  client_rb:
    cache_path: c:/chef/cache

But this does not seem to work :( Can anyone tell me the correct way to accomplish this?

Pezius
  • 117
  • 3
  • 12

2 Answers2

2

Well I have been using the following without issue for a couple weeks now; so I will go ahead and put the solution that I've found incase it helps anyone else:

provisioner:
  name: chef_solo
  solo_rb:
    file_cache_path: 'c:\chef\cache'
Pezius
  • 117
  • 3
  • 12
0

You can't, this is deeply controlled by Test Kitchen. Why do you think you need to change this?

coderanger
  • 52,400
  • 4
  • 52
  • 75
  • Thanks @coderanger - 1) it makes for a VERY long path on Windows 2) When the run is done as Administrator, the profile path is shortened to `ADMINI~1` which, for reasons I don't understand, breaks the silent installation of certain softwares (MSSQL currently) – Pezius Mar 29 '17 at 23:45
  • I'm not sure we have a great solution for this other than to use a different path for the download. – coderanger Mar 30 '17 at 07:24
  • Try using `file_cache_path` as the key under `client_rb`? That might affect some bits, but could leave Kitchen in a broken state too. – coderanger Mar 30 '17 at 07:25
  • I have played around a bit more with this and I think I have solved it, but would appreciate any feedback on the method I'm using. I don't think this has broken anything... ``` provisioner: name: chef_solo solo_rb: file_cache_path: 'c:\chef\cache' ``` – Pezius Mar 30 '17 at 20:54