- From: Sean OMeara <
>
- To: "
" <
>
- Subject: [chef] Re: LWRP for N00bs
- Date: Tue, 26 Aug 2014 23:03:34 -0400
If you just use the libraries directory, it won't try to infer the
name from the cookbook.
Example:
https://github.com/opscode-cookbooks/httpd/blob/master/libraries/resource_httpd_service.rb#L7-L8
On Tue, Aug 26, 2014 at 10:45 PM, Brian
<
>
wrote:
>
I'm trying to figure out why Chef is not correctly loading my lwrps.
>
>
So I'm trying to build a custom lwrp in my recipe.
>
>
I have a cookbook named web_server. I have a resource called webserver.
>
(real
>
original, I know.).
>
>
I'm getting a NameError when I try to use web_serverwebserver in a recipe.
>
I
>
suspect I'm doing something wrong in my load_current_resource, but I don't
>
know
>
what.
>
>
my load_current_resource
>
>
def load_current_resource
>
@current_resource = web_serverwebserver.new(@new_resource.AppName)
>
@current_resource
>
end
>
I have tried
>
>
web_server::webserver.
>
Chef::Resource::webserver
>
Chef::Resource::web_server::webserver
>
and pretty much everything else I can think of. What am I doing wrong here?
>
>
Is there a good way to get Chef to report why it can't seem to find my
>
resource?
>
-l debug doesn't seem to provide much in the way of detail as to why it
>
can't
>
find my lwrp.
Archive powered by MHonArc 2.6.16.