diff --git a/metadata.rb b/metadata.rb index 9d5d459..2148657 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,7 +4,7 @@ license 'Apache 2.0' description 'Installs/Configures statsd' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '0.3.2' +version '0.3.3' depends 'build-essential' depends 'git' diff --git a/recipes/default.rb b/recipes/default.rb index 851cdbf..a1ebdad 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -16,6 +16,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +require 'chef/mixin/deep_merge' include_recipe 'nodejs' include_recipe 'git' @@ -98,12 +99,12 @@ } if node['statsd']['graphite_enabled'] - config_hash[:graphite] = { legacyNamespace: node['statsd']['legacyNamespace'] } - config_hash[:graphitePort] = node['statsd']['graphite_port'] - config_hash[:graphiteHost] = node['statsd']['graphite_host'] + config_hash['graphite'] = { 'legacyNamespace' => node['statsd']['legacyNamespace'] } + config_hash['graphitePort'] = node['statsd']['graphite_port'] + config_hash['graphiteHost'] = node['statsd']['graphite_host'] end - config_hash = config_hash.merge(node['statsd']['extra_config']) + Chef::Mixin::DeepMerge.deep_merge!(node['statsd']['extra_config'], config_hash) variables config_hash: config_hash notifies :restart, 'service[statsd]', :delayed end