[chef] RE: Re: RE: Re: Re: Conditional execution for custom resources


Chronological Thread 
  • From: Adam Jacob < >
  • To: " " < >
  • Subject: [chef] RE: Re: RE: Re: Re: Conditional execution for custom resources
  • Date: Tue, 19 Mar 2013 18:29:31 +0000
  • Accept-language: en-US

For the record, I agree with you.

 

Best,

Adam

 

From: [mailto: On Behalf Of Jay Feldblum
Sent: Tuesday, March 19, 2013 11:21 AM
To:
Subject: [chef] Re: RE: Re: Re: Conditional execution for custom resources

 

Definitions are perfectly fine as macros - functions which, when called, declare resources and add them to the resources-collection. So describe them as macros, not as resources, in the docs. That will stop most of the confusion.

Definitions are useful for when you simply need a lightweight grouping of two or more resource declarations, macro-like, where custom resources & providers (including LWRPs) are too heavyweight.

 

Using custom providers like glorified definitions is poor form. If you have a provider which simply declares some sub-resources, why is that a provider? That should be a definition (macro) instead.

 

Cheers,

Jay

 

On Tue, Mar 19, 2013 at 1:50 PM, Adam Jacob < " target="_blank"> > wrote:

Is there still a case for just making a definition a wrapper around making resources and providers?

 

Adam

 

From: Andrea Campi [mailto: " target="_blank"> ]
Sent: Tuesday, March 19, 2013 5:38 AM
To: " target="_blank">
Subject: [chef] Re: Re: Conditional execution for custom resources

 

On Tue, Mar 19, 2013 at 12:22 PM, Jesse Nelson < " target="_blank"> > wrote:

Definitions aren't proper resources this should work as an LWRP tho.

 

 

Perhaps it's time to deprecate definitions and start deorbiting them in time for Chef 12?

 

Those of us who have been using Chef for a while and following the list know that they are the poor step-brothers of LWRPs, but new users are still confused and start using them, only to be told to stop.

 

Is there any strong argument to keeping them? I'm not aware of any good reason.

 

My proposal is to to:

* remove them from the documentation, or at least clearly mark them as "do not use in new code";

* have Chef 11 log a warning;

* remove them in time for Chef 12.

 

Thoughts?

 

Andrea

 




Archive powered by MHonArc 2.6.16.

§