- From: Phil Dibowitz <
>
- To:
- Subject: [chef] Re: Re: Re: Re: Re: Chef 11 Attribute Changes -- Computed Attributes Edition
- Date: Wed, 7 Nov 2012 11:46:50 -0800
On Wed, Nov 07, 2012 at 12:46:40PM -0500, Jesse Campbell wrote:
>
I'm curious about this... Phil, can you give a more concrete example?
The classic example is:
default_attributes 'sysctl' => {'foo' => 'bar'}
and in a recipe
if memory < X
# ensure node['sysctl']['foo'] isn't greater than Y
end
Here's a slightly contrived example...
Role:
default_attributes 'want_service_x_private_key' => true
Recipe:
unless query_external_source('can_have_service_x_private_key')
node.default['want_service_x_private_key'] = false
end
Doesn't mean I dont' want to be be able to override later. Yes, I can force
that to normal/override but those have specific meaning: I'm OVERRIDING the
standard logic. In this case I"m not, I'm just using logic to determine a
better state of the world. This is the standard logic. It's smarter than the
static world.
In both of these examples I can go into override, but that's non-intuitive and
we work very hard to make sure people can just update the node attribute in
cookbooks as they go along and the right things happen. This is a HORRIBLE
breakage.
--
Phil Dibowitz
Open Source software and tech docs Insanity Palace of Metallica
http://www.phildev.net/ http://www.ipom.com/
"Be who you are and say what you feel, because those who mind don't matter
and those who matter don't mind."
- Dr. Seuss
Attachment:
signature.asc
Description: Digital signature
Archive powered by MHonArc 2.6.16.