Created
July 2, 2012 17:34
-
-
Save jblaine/3034481 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Simple, and typed nearly verbatim from: | |
http://wiki.opscode.com/display/chef/Recipes#Recipes-NodeAttributes | |
# cookbooks/ntp/recipes/default.rb | |
package_name = value_for_platform ( | |
["centos", "redhat", "fedora"] => { | |
"default" => "ntp" | |
}, | |
["solaris2"] => { | |
"default" => "SUNWntpr" | |
} | |
) | |
# ...snip... | |
Gives me: | |
"exception": "SyntaxError: /var/chef/cache/cookbooks/ntp/recipes/default.rb:13: syntax error, unexpected tAS | |
SOC, expecting ')'\n [\"centos\", \"redhat\", \"fedora\"] => {\n ^\n/va | |
r/chef/cache/cookbooks/ntp/recipes/default.rb:14: syntax error, unexpected tASSOC, expecting $end\n \"d | |
efault\" => \"ntp\"\n ^", | |
"backtrace": [ | |
"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/mixin/from_file.rb:30:in `instance_eval' | |
", | |
"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/mixin/from_file.rb:30:in `from_file'", | |
"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/cookbook_version.rb:578:in `load_recipe' | |
", | |
"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/mixin/language_include_recipe.rb:40:in ` | |
block in include_recipe'", | |
"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/mixin/language_include_recipe.rb:27:in ` | |
each'", | |
"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/mixin/language_include_recipe.rb:27:in ` | |
include_recipe'", | |
"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/run_context.rb:72:in `block in load'", | |
"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/run_context.rb:69:in `each'", | |
"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/run_context.rb:69:in `load'", | |
"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/client.rb:195:in `setup_run_context'", | |
"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/client.rb:159:in `run'", | |
"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/application/client.rb:239:in `block in r | |
un_application'", | |
"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/application/client.rb:229:in `loop'", | |
"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/application/client.rb:229:in `run_applic | |
ation'", | |
"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/application.rb:67:in `run'", | |
"/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-0.10.8/bin/chef-client:26:in `<top (required)>'", | |
"/opt/chef/bin/chef-client:19:in `load'", | |
"/opt/chef/bin/chef-client:19:in `<main>'" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment