[chef] Re: Re: Definition question


Chronological Thread 
  • From: James Scott < >
  • To:
  • Subject: [chef] Re: Re: Definition question
  • Date: Wed, 26 Feb 2014 09:31:24 -0800

Yes, this is a documentation bug. Or was. That page is now updated. Thanks for catching this!


On Wed, Feb 26, 2014 at 3:40 AM, Sean OMeara < " target="_blank"> > wrote:
I think this is a documentation bug. 

It's meant to say that while definitions often "look" like resources in a chef recipe (apache_site "mysite" do..), they don't behave like them. You cant notify/subscribe to an apache_site, for example. Its just a macro that yields a set of resources on the resource_collection. This is contrasted with a custom type implemented with the LWRP DSL, where you can..

-s


On Tue, Feb 25, 2014 at 6:01 PM, Benjamin Bytheway < " target="_blank"> > wrote:
In the documentation for definitions (http://docs.opscode.com/essentials_cookbook_definitions.html), I notice it says:

"resource notifications will not work normally when the resource to be notified is located in a definition"

I was curious why this is the case, since it looked to me by reading the code that definitions just loaded any defined resources into the resource_collection, just as the recipe DSL would do, which should mean notifications should work. 

I've done a test and a resource outside a definition notifying a resource inside a definition seems to work for me. A resource inside a definition also seems to be able to send notifications to resources outside the definition just fine.

Has the functionality changed so that the warning in the documentation is no longer valid, or am I missing a subtlety?

-Ben





Archive powered by MHonArc 2.6.16.

§