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

Add support for 'site' option. #582

Merged
merged 9 commits into from
Apr 26, 2019
Prev Previous commit
Next Next commit
Drop support chef-handler-datadog < v0.10.0
  • Loading branch information
remeh committed Mar 28, 2019
commit b4ad53ea78aa4f4c66e21827cdd6759078505426
15 changes: 5 additions & 10 deletions recipes/dd-handler.rb
Original file line number Diff line number Diff line change
@@ -27,16 +27,11 @@

include_recipe 'chef_handler'

# Since Agent 6 supports node['datadog']['url'] = nil, we need to fallback
# on a default value here.
# FIXME(remy): this logic has been duplicated below in this file, moreover,
# the DATADOG_HOST is needed only until v0.9.0 of chef-agent-handler, we should
# think of removing it in a major release. See
# https://github.com/DataDog/chef-datadog/pull/582#discussion_r260004814
dd_url = 'https://app.datadoghq.com'
dd_url = node['datadog']['url'] unless node['datadog']['url'].nil?

ENV['DATADOG_HOST'] = dd_url
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.')
return
end

chef_gem 'chef-handler-datadog' do # ~FC009
action :install