[chef] Re: Re: Re: Re: RE: Re: RE: Re: Custom LWRP Initialise Error


Chronological Thread 
  • From: Kevin Bridges < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: RE: Re: RE: Re: Custom LWRP Initialise Error
  • Date: Wed, 30 Jul 2014 17:34:23 -0600

What you describe sounds accurate ... it is now seems to be raising the gotcha you mention. The error moved from no resource for notifies to:

INFO: apache2_web_app[/etc/httpd/sites-available/basic_web_app.conf] sending reload action to service[apache2] (delayed)
DEBUG: Re-raising exception: NoMethodError - undefined method `run_action' for "service[apache2]":String
 
Is there a way around this or should I consider a different approach?

Thanks

On Wed, Jul 30, 2014 at 4:47 PM, Daniel DeLeo < " target="_blank"> > wrote:


On Wednesday, July 30, 2014 at 2:02 PM, Kevin Bridges wrote:

> I'm hitting the same question with the notifies resource and can provide a code sample/error message.
>
> https://gist.github.com/cyberswat/a963b6def502356dee42 shows an example provider, resource and a wrapper recipe that can call the notifies without issue. Moving the notifies call into the provider, as illustrated in https://gist.github.com/cyberswat/8cb36e7f6fc6bb42cad3, causes the error.
>
> Seems like I'm not including something I should be, but it escapes me.

Notifications are a property of a resource, so the method is defined for resources but not providers. You could do something like `new_resource.notifies(ARGS)` I think. Be sure to test that though, there is a possible gotcha involving looking up the actual ruby object that matches the 'service[apache2]’ string.

--
Daniel DeLeo





Archive powered by MHonArc 2.6.16.

§