[chef] Re: ruby code in lwRp decalaration


Chronological Thread 
  • From: Andrew Gross < >
  • To: chef < >
  • Subject: [chef] Re: ruby code in lwRp decalaration
  • Date: Fri, 31 May 2013 13:16:34 -0400

You will probably have to write up a HWRP to get the kind of lazy evaluation you want


On Fri, May 31, 2013 at 12:51 PM, Dorian Jaminais < " target="_blank"> > 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







Archive powered by MHonArc 2.6.16.

§