- From: Juan Jesús Ojeda Croissier <
>
- To:
- Subject: [chef] Re: Re: Re: Re: Re: How to add ruby lib as depend at LWRP
- Date: Tue, 13 Dec 2011 16:40:57 +0100
I did put at the code at the begining of the provider and didn't work,
I dot those errores I put before.
Seems like there is not package resource or node's run_context at that
point of the compile time.
On Tue, Dec 13, 2011 at 3:29 PM, Bryan Berry
<
>
wrote:
>
that code should work if you run it inside your provider, iirc
>
>
it should run immediately and not at the end
>
>
>
2011/12/13 Juan Jesús Ojeda Croissier
>
<
>
>
>
>
> Actually, this doesn't help, because the recipe is loaded at the end,
>
> but I need the package available when the provider is loading (just
>
> after libraries and before the resources, attributes, definitions and
>
> recipes:
>
>
>
> http://wiki.opscode.com/display/chef/Anatomy+of+a+Chef+Run
>
>
>
> But thanks anyway for the help :-)
>
>
>
> On Tue, Dec 13, 2011 at 3:06 PM, Ranjib Dey
>
> <
>
>
> wrote:
>
> > yum. thats the way you do it,
>
> > you can see an example of this in aws community cookbook, which
>
> > provides
>
> > elastic ip and eb colume resources but needs right_aws gem .
>
> >
>
> > https://github.com/opscode/cookbooks/blob/master/aws/recipes/default.rb
>
> >
>
> > regards
>
> >
>
> >
>
> > On Tue, Dec 13, 2011 at 5:38 PM, Bryan Berry
>
> > <
>
>
> > wrote:
>
> >>
>
> >> juanje
>
> >>
>
> >> how about this?
>
> >>
>
> >> # at beginning of lwrp
>
> >> f = package "foo" do
>
> >> action :install
>
> >> end
>
> >> f.run_action(:install)
>
> >>
>
> >> this might trigger the install action immediately
>
> >>
>
> >> this is just an idea. I have done something similar w/ execute
>
> >> resources
>
> >> but not with package resources
>
> >>
>
> >>
>
> >> 2011/12/13 Juan Jesús Ojeda Croissier
>
> >> <
>
>
> >>>
>
> >>> Hi :-)
>
> >>>
>
> >>> I was tring to find a example or doc about how to do it and I didn't
>
> >>> find. Maybe I didn't know where to search...
>
> >>>
>
> >>> My problem is that I have a LWRP that need a Ruby library ( require
>
> >>> 'sqlite3' ) and I don't know how to be sure that the library is
>
> >>> already installed.
>
> >>> Is there any way to install the package from the cookbook before the
>
> >>> provider (LWRP) be loaded?
>
> >>>
>
> >>> Any pointers will help. I'm already trying at
>
> >>> $COOKBOOK/libraries/default.rb with no much luck. At least I don't
>
> >>> know how to call properly from there the 'package' provider.
>
> >>>
>
> >>> Thanks :-)
>
> >>>
>
> >>> --
>
> >>> Juanje
>
> >>
>
> >>
>
> >
>
>
>
>
>
>
>
> --
>
> Juanje
>
>
--
Juanje
Archive powered by MHonArc 2.6.16.