- From: Sean OMeara <
>
- To:
- Subject: [chef] Re: Include Gloabl Variables
- Date: Tue, 22 Mar 2011 12:00:26 -0400
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=j3mluC0XbixE+cOIxQEjA3GhkP7vP7ZTvHv92Dlox8CAnf4fakLTHjD6gZ2FbxjNj6 FJ6P3x2/ayDHRgC5E5Uw3gob1YYmR7k3Sx9h5DfGj91EDdpLSwoB20bAV/uaSmpTyYtf 9nD5vfGJRPwriG9L5p8589CKxCg/G56/NrxzE=
Data bags can be thought of as read only global variables that can be
accessed across the cookbook boundary. They are probably the droid
you're looking for.
http://wiki.opscode.com/display/chef/Data+Bags
On Tue, Mar 22, 2011 at 11:54 AM, WEINHAPL Andreas
<
>
wrote:
>
HI,
>
>
>
>
I know that there are many ways to include global attributes into a new
>
cookbook. But is there a way to create a global_attributes file (there are
>
lots of information and dependencies in there) which will be included into
>
a new cookbook.
>
>
>
>
I think the sentences makes no sense at all (if I read it a second time) but
>
I will explain it:
>
>
>
>
Attribute file (stands alone with no recipe and so on)
>
>
(code, ok not the real code J )
>
>
If platform = debian -> x = 23 else 24
>
>
>
>
And this information should be inserted in a file which I created with the
>
cookbook “Whats_the_answer”
>
>
(coe, not the real one)
>
>
Create file to /tmp/blubb with information “x”
>
>
>
>
The Problem is that I only want to use 1 attributes file where all the
>
information is stored.
>
>
>
>
I tested it with the “include recipes”-method bnut this doesn’t work for
>
attributes, too.
>
>
>
>
Kind regards
Archive powered by MHonArc 2.6.16.