[chef] Re: Re: Getting CookbookVersion at runtime


Chronological Thread 
  • From: Lamont Granquist < >
  • To:
  • Subject: [chef] Re: Re: Getting CookbookVersion at runtime
  • Date: Thu, 24 Apr 2014 15:39:53 -0700


There's an obvious Recipe DSL enhancement to add cookbook_version as a method that does that.  PRs encouraged.

On 4/24/14, 2:15 PM, Ranjib Dey wrote:
" type="cite">
 node.run_context.cookbook_collection[cookbook_name].metadata.version

cool, isnt it?



On Thu, Apr 24, 2014 at 1:29 PM, Tucker < " target="_blank"> > wrote:
Obligatory first line greeting that is apparently acceptable to ignore-

I have a need to determine a Chef cookbook version at runtime, so I can compare it with a local file but I haven't found the secret sauce to make that work.  Since I've run out of time that I can work on it until later today or tomorrow, I thought I'd put this out to the community.  I thought there was something I could do with Chef::CookbookVersion but now I think that's off track.

I have a hacky way that uses file system paths but that makes me kinda sad to use.

--

--tucker





Archive powered by MHonArc 2.6.16.

§