Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #29 from cotap/symbol-string
Browse files Browse the repository at this point in the history
Allows for extra configuration with the 'graphite' key.
  • Loading branch information
mheffner committed Sep 4, 2014
2 parents cb55745 + 713d3e6 commit 0fe509c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
9 changes: 5 additions & 4 deletions recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0fe509c

Please sign in to comment.