Skip to content

Commit

Permalink
Merge pull request #597 from DataDog/remeh/dd-handler
Browse files Browse the repository at this point in the history
Removes the include_recipe chef_handler call from dd-handler
remeh authored Apr 26, 2019
2 parents df7fcc2 + d58221f commit bb6af46
Showing 3 changed files with 13 additions and 6 deletions.
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

0 comments on commit bb6af46

Please sign in to comment.