[chef] Re: Re: Re: Howto read cookbook version info from metadata.rb in recipe by runtime on a node


Chronological Thread 
  • From: "Oleg Volotov" < >
  • To:
  • Subject: [chef] Re: Re: Re: Howto read cookbook version info from metadata.rb in recipe by runtime on a node
  • Date: Tue, 30 Oct 2012 08:22:57 +0100

THATS IT!!, thanks.

e.g. run_context.cookbook_collection["mycookbook"].metadata.version

I've been looking the libs on GitHub 
(https://github.com/opscode/chef/tree/master/chef/lib/chef) and there I found 
the cookbook_collection already. But I dont know how to get the reference of 
it. 

Therefore I wanted to ask, is there a page or pages on which you can read 
exactly how chef works, so that when class is loaded or something like that?

Also a page for a view from programmers?

mfg
oleg

-------- Original-Nachricht --------
> Datum: Mon, 29 Oct 2012 16:30:22 +0100
> Von: Andrea Campi 
> < >
> An: 
> 
> Betreff: [chef] Re: Re: Howto read cookbook version info from metadata.rb 
> in recipe by runtime on a node

> On Mon, Oct 29, 2012 at 3:32 PM, Mike 
> < >
>  wrote:
> 
> > Oleg,
> >
> > You might be looking for this:
> >
> >
> http://wiki.opscode.com/display/chef/Environments#Environments-cookbookversions
> >
> >
> Mike: I don't think that's what he's asking for…
> 
> Oleg: try
> 
> run_context.cookbook_collection[cookbook].metadata.version



Archive powered by MHonArc 2.6.16.

§