[dd-handler] Add attribute for custom gem server
MODIFY
attributes/default.rb
attributes/default.rb
@@ -268,3 +268,8 @@ default['datadog']['ddtrace_python_version'] = nil
# ddtrace ruby gem version
default['datadog']['ddtrace_gem_version'] = nil
+
+# For custom gem servers on restricted networks
+# This attribute only works on Chef >= 12.3
+# Change false to the URL of your custom gem server
+default['datadog']['gem_server'] = false

MODIFY
recipes/dd-handler.rb
recipes/dd-handler.rb
@@ -34,6 +34,8 @@ chef_gem 'chef-handler-datadog' do # ~FC009
version node['datadog']['chef_handler_version']
# Chef 12 introduced `compile_time` - remove when Chef 11 is EOL.
compile_time true if respond_to?(:compile_time)
+ clear_sources true if node['datadog']['gem_server']
+ source node['datadog']['gem_server'] if node['datadog']['gem_server']
end
require 'chef/handler/datadog'

[dd-handler] Add attribute for custom gem server (#413)