Update chef-sugar to fix a conflict in Chef 16+

This commit is contained in:
Greg Karékinian
2023-06-28 16:08:32 +02:00
parent b9cf396d42
commit ddeebc739d
63 changed files with 4700 additions and 101 deletions

View File

@@ -17,18 +17,4 @@
# limitations under the License.
#
gem_version = run_context.cookbook_collection[cookbook_name].metadata.version
if Chef::Resource::ChefGem.instance_methods(false).include?(:compile_time)
chef_gem 'chef-sugar' do
version gem_version
compile_time true
end
else
chef_gem 'chef-sugar' do
version gem_version
action :nothing
end.run_action(:install)
end
require 'chef/sugar'
Chef::Log.warn('chef-sugar::default no longer needs to be included in your runlist. Instead simply depend on the chef-sugar cookbook and the gem will be installed and loaded automatically.')