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
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?