- From: Jeremy Voorhis <
>
- To:
- Subject: [chef] Re: Lock an environment's cookbooks
- Date: Thu, 21 Jun 2012 21:16:16 -0700
I've done this once before using shef, and it turns out to be pretty easy.
1) Fire up shef like so
% shef -z -c ~/.chef/knife.rb
2) Load your environment
chef > env = Chef::Environment.load('YOUR_ENV_HERE')
3) Grab your cookbook versions and format to taste.
chef > env.cookbook_versions
=> {"build-essential"=>"= 1.0.0", … }
4) Include your output in environments/YOUR_ENV_HERE.rb
5) Upload
% knife environment from file environments/YOUR_ENV_HERE.rb
HTH,
Jeremy
On Jun 21, 2012, at 8:44 PM, John Dyer wrote:
>
Hey Guys,
>
>
Is there any way to take an environment, which currently has no cookbook
>
version constraints, and set each cookbook version to the latest of whats
>
deployed on my chef server? Would really suck to have to get the expanded
>
run list and do "knife node show" on each... Any other way about this ?
>
>
-John
Archive powered by MHonArc 2.6.16.