[chef] Re: Re: ruby code in lwRp decalaration


Chronological Thread 
  • From: Dorian Jaminais < >
  • To: " " < >
  • Subject: [chef] Re: Re: ruby code in lwRp decalaration
  • Date: Fri, 31 May 2013 19:52:27 +0200

@Joseph, indeed that's what I do right now but I was wondering if it was possible

Thanks for your answer


2013/5/31 Joseph Holsten < " target="_blank"> >
Typically, I leave that with a default of nil in the resource attributes and conditionally set it in the provider.
--
~j

On 2013-05-31, at 09:51, Dorian Jaminais < "> > wrote:

> Hi all,
>
> In a LRWP resource definition (the file in ./resources), is it possible to do something like :
> actions :install
> default_action :install
> attribute :name, :kind_of => String, :name_attribute => true
> attribute :repository, :kind_of => String, :default => node[:name]['repository']
>
> Unfortunately :name is not yet defined when my third line gets executed.
> Is there a way to access it from within that file (I need it to define other attributes default)?
>
> --
> Dorian JAMINAIS
> System Administrator
> +33 6 95 10 95 37
>
>
>




--
Dorian JAMINAIS
System Administrator
+33 6 95 10 95 37






Archive powered by MHonArc 2.6.16.

§