[chef] Re: Re: Re: raise_unless


Chronological Thread 
  • From: AJ Christensen < >
  • To:
  • Subject: [chef] Re: Re: Re: raise_unless
  • Date: Sat, 17 Jul 2010 09:47:57 +1200

Yo,

On 17 July 2010 03:36, Daniel DeLeo < "> > wrote:
On Thu, Jul 15, 2010 at 10:37 PM, Andrew Shafer < "> > wrote:
>
> Someone told me I didn't explain what I was asking well enough, so here is
> an attempt to do that.

[snip]


So in my view, you'd want to put this in a recipe file, and if you put
it there, it might make sense to use a more general "assert" method
and define it on Chef::Recipe or even make it a LWRP. Then you could
make assertions about the system state outside of Chef if you needed
to. On the other hand, maybe I'm architecture astronaut-ing.

I like the idea though, many times new users have not set their FQDN
before running the bootstrap and then been confused by the "attribute
domain is not defined" error. It would be much nicer to see that the
attribute is not defined and abort with a message about setting the
domain name.

This sounds like it solves a commonly overlooked problem in sharing cookbooks with other users; especially (sharing with) those not familiar enough around Ruby or Chef to understand some advanced recipe constructs or usage.

Simply being able to request that particular dataz are available on the node by way of assertion seems to largely reduce any confusion that might occur. Even works for solo.

I can dig the shit outta this

Regards,

AJ



Archive powered by MHonArc 2.6.16.

§