Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

set attributes from recipes in a chef 11-compatible way #7

Merged
merged 1 commit into from

2 participants

@anujbiyani

Fixes this warning:

WARN: Setting attributes without specifying a precedence is deprecated and will be
removed in Chef 11.0. To set attributes at normal precedence, change code like:
`node["key"] = "value"` # Not this
to:
`node.set["key"] = "value"` # This

Called from:
  cookbooks/papertrail/recipes/default.rb:81:in `from_file'
  gems_root/chef-10.20.0/lib/chef/mixin/from_file.rb:30:in `instance_eval'
  gems_root/chef-10.20.0/lib/chef/mixin/from_file.rb:30:in `from_file'

Also resolves #5

@mheffner mheffner merged commit 9cc0f2c into librato:master
@mheffner
Owner

Oops, missed this earlier. Thanks for the PR!

@sentience sentience referenced this pull request
Closed

Fix deprecated node[] set #5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 9, 2013
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  recipes/default.rb
View
2  recipes/default.rb
@@ -78,7 +78,7 @@
hostname_cmd = node['papertrail']['hostname_cmd'].to_s
unless hostname_name.empty? && hostname_cmd.empty?
- node['papertrail']['fixhostname'] = true
+ node.set['papertrail']['fixhostname'] = true
if !hostname_name.empty?
name = hostname_name
Something went wrong with that request. Please try again.