Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes the include_recipe chef_handler call from dd-handler #597

Merged
merged 7 commits into from
Apr 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -54,6 +54,19 @@ The following Opscode cookbooks are dependencies:
* `chef_handler`
* `yum`

### Chef support

**Chef 13 users**

- If you're using Chef 13 and chef_handler 1.x, you may have trouble using the
dd-handler recipe. The known workaround is to update your dependency to `chef_handler >= 2.1`.

**Chef 14 and 15 users**:

- In order to support Chef 12 and 13, the `datadog` cookbook has a dependency to
the `chef_handler` cookbook which is now shipped as a resource in Chef 14.
Unfortunately, it will display a deprecation message to Chef 14 and 15 users.

Recipes
=======

2 changes: 0 additions & 2 deletions recipes/dd-handler.rb
Original file line number Diff line number Diff line change
@@ -25,8 +25,6 @@
return
end

include_recipe 'chef_handler'

if node['datadog']['chef_handler_version'] &&
Gem::Version.new(node['datadog']['chef_handler_version']) < Gem::Version.new('0.10.0')
Chef::Log.error('We do not support chef_handler_version < v0.10.0 anymore, please use a more recent version.')
4 changes: 0 additions & 4 deletions spec/dd-handler_spec.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
require 'spec_helper'

shared_examples 'a chef-handler-datadog installer' do |version|
it 'includes chef_handler recipe' do
expect(chef_run).to include_recipe('chef_handler')
end

it 'installs the right version of chef-handler-datadog' do
expect(chef_run).to install_chef_gem('chef-handler-datadog').with(version: version)
end