Reputation: 5
Is it possibile to get absolute path to cookbook directory(I don't need path to cache).
What I want to do? My structure:
Chef -Cookbooks(tomcat, java, etc.) -Profiles(json files with configs) -Resources(zip files with programs) runScript0.bat runScript1.bat ....
How can I get path to Resources folder from recipes, I need to get files from this folder w/o hardcodded path. Of course I can download programs from svn/git, but I need this option too.
Upvotes: 0
Views: 286
Reputation: 54267
The structure you describe is not inside a cookbook so those files do not exist as far as Chef is concerned. Even inside a cookbook, you need to use a cookbook_file
or remote_directory
resource to write to a known place first.
Upvotes: 1