[chef] Re: Re: Re: Re: Wrapper cookbooks and attribute logic


Chronological Thread 
  • From: Drew Blessing < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: Wrapper cookbooks and attribute logic
  • Date: Mon, 15 Jun 2015 14:42:34 -0500

Yoshi,

Wrapper cookbooks do not necessarily need to use a higher precedence level because of load order. If a wrapper cookbook depends on a 'dependent' cookbook the dependent cookbook's attributes are loaded first, and then the wrapper cookbook. This effectively overrides the dependent cookbook's default attributes without using a higher precedence level. Note that a higher precedence level in the dependent cookbook *will* override a wrapper's default level attribute, though. 

On Mon, Jun 15, 2015 at 1:55 PM, Bryan Baugher < " target="_blank"> > wrote:
Wow thats exactly my problem[1] thanks!


Also, when you say 'default' are you meaning default priority?

i.e. default['cookbook']['attribute'] = 'thing'?

Cause if you are trying to override a base cookbook you will need to use a priority level above default in your wrapper attributes,

i.e. set['cookbook']['attribute'] = 'override thing'

On Mon, Jun 15, 2015 at 11:13 AM, Kenneth Barry < " target="_blank"> > wrote:
I "Think" this may be atleast part of what yur dealing with.


On Mon, Jun 15, 2015 at 11:05 AM, Bryan Baugher < " target="_blank"> > wrote:
Hi everyone,

We have recently started using wrapper cookbooks which generally just set some default attributes. We are running into issues where cookbooks we are consuming are attempting to do some kind of logic in their attributes file based on these attribute values. We run into problems when these cookbooks load their attribute files first before our wrapper cookbooks can apply their defaults.

Has anyone run into this problem? Any ideas?



--

Kenneth Barry 

TuneIn | Build and Release Engineer






--
Drew



Archive powered by MHonArc 2.6.16.

§