Skip to content

Commit

Permalink
[FIX] Fix incorrect attribute setting in default.rb
Browse files Browse the repository at this point in the history
The default.rb attributes file used Chef 11 incompatible syntax for setting the node default attribute,
throwing the `Chef::Exceptions::ImmutableAttributeModification` exception.

See: http://www.opscode.com/blog/2013/02/05/chef-11-in-depth-attributes-changes/

Related: #68, #69
  • Loading branch information
karmi committed Feb 27, 2013
1 parent 8b940a0 commit ac4bb01
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

# Initialize the node attributes with node attributes merged with data bag attributes
#
node.set[:elasticsearch] ||= {}
node.set[:elasticsearch] = DeepMerge.merge(node[:elasticsearch].to_hash, settings.to_hash)
node.default[:elasticsearch] ||= {}
node.default[:elasticsearch] = DeepMerge.merge(node.default[:elasticsearch].to_hash, settings.to_hash)

# === VERSION AND LOCATION
#
Expand Down
2 changes: 1 addition & 1 deletion recipes/aws.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node.set[:elasticsearch][:plugin][:mandatory] = node[:elasticsearch][:plugin][:mandatory] | ['cloud-aws']
node.default[:elasticsearch][:plugin][:mandatory] = node[:elasticsearch][:plugin][:mandatory] | ['cloud-aws']

install_plugin "elasticsearch/elasticsearch-cloud-aws/#{node.elasticsearch[:plugins][:aws][:version]}"

0 comments on commit ac4bb01

Please sign in to comment.