Skip to content

Instantly share code, notes, and snippets.

@dstrelau
Created June 16, 2010 14:18
Show Gist options
  • Save dstrelau/440767 to your computer and use it in GitHub Desktop.
Save dstrelau/440767 to your computer and use it in GitHub Desktop.
I'm trying to run the chef::bootstrap_server recipe from the
HEAD of '09beta' branch of opscode/cookbooks and seeing
weirdness with attribute lookup.
chef v0.9.0.b02 via `chef-solo -j dna.json -c solo.rb`
print "node[:chef][:webui_enabled] "
puts node[:chef][:webui_enabled]
print "node.chef[:webui_enabled] "
puts node.chef[:webui_enabled]
print "node.chef.attribute?(:webui_enabled) "
puts node.chef.attribute?(:webui_enabled)
print "node.chef.webui_enabled "
puts node.chef.webui_enabled
{
"chef": {
"server_url": "http://XXXX.localdomain:4000",
"init_style": "runit",
"path": "/var/lib/chef",
"run_path": "/var/run/chef",
"cache_path": "/var/cache/chef"
},
"run_list": "recipe[chef::bootstrap_server]"
}
node[:chef][:webui_enabled] false
node.chef[:webui_enabled] false
node.chef.attribute?(:webui_enabled) false
node.chef.webui_enabled [Wed, 16 Jun 2010 07:13:44 -0700] ERROR: Re-raising exception: ArgumentError - Attribute webui_enabled is not defined!
/usr/lib/ruby/gems/1.8/gems/chef-0.9.0.b02/bin/../lib/chef/node/attribute.rb:415:in `method_missing'
/tmp/chef-solo/cookbooks/chef/recipes/bootstrap_server.rb:131:in `from_file'
file_cache_path "/tmp/chef-solo"
cookbook_path "/tmp/chef-solo/cookbooks"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment