[chef] Re: Re: Re: Re: LWRP prevents code-reuse...


Chronological Thread 
  • From: Ringo De Smet < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: LWRP prevents code-reuse...
  • Date: Mon, 5 Jul 2010 17:12:49 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=WE3TAixWkpn6RHlOSVy4MrDiVSuY664CoiuoJf8A6ebPexjxjCFEtZlX1UXCNXG+Kp Ir7ZLSxLjW6q4sJ3jEHCwYUk4mMUs6oCuGYR4BkDVaCmmTbRiFPVqEqkLBrAcYtUtJF/ oGjN1ItpYdi+jSUyWDAVrmvwsuKAHCj1yairA=

Daniel,

On 1 July 2010 17:50, Daniel DeLeo 
< >
 wrote:
> Chef will automatically load them, but not in any guaranteed order. If
> they are all in the same cookbook, I'd recommend using something like:
>
> require File.dirname(__FILE__) + '/qshell_resource'

The ruby require worked now. However, on the Chef level, it is a pity
I can't use my custom script resource in the body of my package
provider:

def install_package(name, version)
  pylabs_qshell "install_package" do
    user "root"
    code <<-EOH
    pkg = 
q.qp.find('#{new_resource.package_name}','#{new_resource.domain}','#{new_resource.version}')
    pkg.install()
    EOH
  end
end

This would be a very elegant implementation. Any more suggestions? :-)

Ringo



Archive powered by MHonArc 2.6.16.

§