0

If my base cookbook is something like this:

SSLCERT = node[:site][:SSLCert]
cookbook_file SSLCert do
    path "c:/tmp/#{SSLCert}"
    action :create_if_missing
end

And my wrapper has

override[:site][:SSLCert] = "cert.pfx"

I would like to specify the cert.pfx file in the wrapper cookbook's file/default/cert.pfx

However when I run the wrapper, I get

FileNotFound: cookbook_file[cert.pfx] does not contain a file at any of these locations....

How do I specify the cookbook file is in the wrapper and not in the base cookbook?

Ivaylo Slavov
  • 8,839
  • 12
  • 65
  • 108
Jim
  • 61
  • 6
  • `#tell the base cookbook where the cert is located r = resources("cookbook_file[#{node[:site][:SSLCert]}]") r.cookbook('wrapper_cook_book')` Found the answer: [link]http://stackoverflow.com/questions/21045855/chef-rewind-cookbook-file-definition-from-a-wrapper-cookbook-recipe – Jim Feb 04 '14 at 19:13
  • Can you update your question to have the exact chef error message – Jeremy Quinton Feb 05 '14 at 13:29

1 Answers1

0

I think you might need to change your wrapers cookbook to have files plural with an s instead of file.

e.g. files/default/cert.pfx
Jeremy Quinton
  • 688
  • 4
  • 13
  • No, the http://stackoverflow.com/questions/21045855/chef-rewind-cookbook-file-definition-from-a-wrapper-cookbook-recipe is correct, you just need to let the cookbook_file resource know that the file is located in wrapper even though the resource is defined in the base. Got it working using the answer from the link. – Jim Feb 08 '14 at 23:39
  • Ok glad you got the answer – Jeremy Quinton Feb 09 '14 at 16:11