[chef] pre-load idea


Chronological Thread 
  • From: Tom < >
  • To:
  • Subject: [chef] pre-load idea
  • Date: Fri, 28 Sep 2012 00:10:33 +0100

I have the seed of an idea and was wondering if this is possible to hook into from the current chef code.

Now that there is the implementation of why-run, (and this could apply even before this) would it be possible to hook into chef at run compilation time and dump out all the attributes that would be set during a run?

I'm thinking of an idea even prior to why-run.

Suppose you have a run_list; I can see a scenario where I would like to load all recipes in a run_list and dump out all the attributes that would be set in the run - including their priority from overrides. This would allow a sanity check of new config that could be applied, but equally allow you to see what attributes you may have missed from a cookbook that might need setting/overriding.

I've been stung by this behaviour a few times recently when a change had been made that propagated to our release branch and a sanity check would have helped.

Clearly there is good logic within Chef that calculates the attribute precedence and I wouldn't want to rewrite this. Could I hook into Chef somehow and grab the compiled run to deliver me all set attributes?

I appreciate there are cases where search against databags or infra occur during a run that may change set attributes, but I think I will disregard that on first pass.

Ideas, comments welcome.

Tom

 


  • [chef] pre-load idea, Tom, 09/27/2012

Archive powered by MHonArc 2.6.16.

§