Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix regression with `gpg` attribute #8
In commit 50f5fa4, we fixed the recipes to use the right attribute,
This only manifested when using a recipe with
In commit 50f5fa4, we fixed the recipes to use the right attribute, gpg instead of key. However, the logic in the attributes file looks for /opt/opscode/embedded/keys/packages-chef-io-public.key and sets the key attribute to that file path. This causes the apt_repository provider logic to try and use a cookbook_file resource to retrieve that, which cannot be found. The fix is to set the value to nil if the key file exists from a Chef Server package, because we know we'll have the key from a previous installation. This only manifested when using a recipe with `chef_ingredient "chef-server"`, and could not be reproduced on a clean `kitchen test`.