How can I tell if a Chef cookbook is frozen

If a Chef cookbook is “frozen”, the cookbook is protected against accidental overwrite.

When someone tries to overwrite it the
Version ... of cookbook COOKBOOK_NAME is frozen. Use --force to override"
message appears.

To check if a Chef cookbook is frozen on the Chef server execute the following command
knife cookbook show COOKBOOK_NAME latest | grep frozen

To upload a Chef cookbook and freeze it to prevent accidental overwrite
knife cookbook upload COOKBOOK_NAME --freeze

To overwrite a frozen cookbook upload it with
knife cookbook upload COOKBOOK_NAME --force

To freeze the referenced cookbooks when you upload them with BerkShelf upload them with
berks upload
(do not use the –no-freeze option)

Join the Conversation

2 Comments

  1. So, when “berks upload” is executed without a -n-freeze, cookbook is uploaded to the chef server and frozen?

Leave a comment

Leave a Reply