- From: Peter Donald <
>
- To: Chef Mailing List <
>
- Subject: [chef] Cookbook versions on node
- Date: Wed, 8 Feb 2012 13:36:21 +1100
Hi,
I would like to enforce certain cookbook version requirements on
cookbooks in different environments from within a recipe.
i.e. All cookbooks on "production" environment must have an even minor
version. (i.e. 10.0.2 is valid but 10.0.3 is not). I also want to
require that cookbooks be locked or not. (i.e. cookbook referenced in
production environments must be frozen).
Doing something like
node.run_list.expand(node.chef_environment).recipes.with_versions.each
do |recipe|
p recipe
end
will only include the versions if they have been explicitly set and
will not allow me to check to see if the version is locked.
Anyone have a good idea how to do this?
--
Cheers,
Peter Donald
- [chef] Cookbook versions on node, Peter Donald, 02/07/2012
Archive powered by MHonArc 2.6.16.