-
-
Save stormsilver/222517 to your computer and use it in GitHub Desktop.
This file contains 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
This is in my attributes file. | |
case fqdn | |
when "goofy.hosted.exlibrisgroup.com" | |
set[:monitoring][:services] = "goofy_service" | |
when "ldaptest1.hosted.exlibrisgroup.com" | |
set[:monitoring][:services] = "ldaptest1_service" | |
else | |
set[:monitoring][:services] = "other_service" | |
end | |
This is the section of code in my test.erb file. | |
<% @monitoring_services.each do |service| -%> | |
<% if service == "goofy_service" then -%> | |
This is goofy | |
<% elsif service == "ldaptest1_service" then -%> | |
This is ldaptest1 | |
<% else -%> | |
I don't know who this is | |
<% end -%> | |
<% end -%> | |
This is part of the debug output. | |
[Fri, 30 Oct 2009 12:42:10 -0400] DEBUG: Cached template for template[/etc/testfile] is unchanged | |
[Fri, 30 Oct 2009 12:42:10 -0400] ERROR: template[/etc/testfile] (/usr/lib64/ruby/gems/1.8/gems/chef-0.7.10/lib/chef/recipe.rb line 191) had an error: | |
Chef::Mixin::Template::TemplateError (compile error | |
(erubis):27: unterminated string meets end of file | |
(erubis):27: syntax error) on line #27: | |
25: <%= This is ldaptest1 -%> | |
26: <% else -%> | |
27: <%= I don't know who this is -%> | |
28: <% end -%> | |
(erubis):27:in `evaluate' | |
/usr/lib64/ruby/gems/1.8/gems/erubis-2.6.5/lib/erubis/evaluator.rb:73:in `evaluate' | |
/usr/lib64/ruby/gems/1.8/gems/chef-0.7.10/lib/chef/mixin/template.rb:31:in `render_template' | |
/usr/lib64/ruby/gems/1.8/gems/chef-0.7.10/lib/chef/provider/template.rb:102:in `action_create' | |
/usr/lib64/ruby/gems/1.8/gems/chef-0.7.10/lib/chef/runner.rb:85:in `send' | |
/usr/lib64/ruby/gems/1.8/gems/chef-0.7.10/lib/chef/runner.rb:85:in `converge' | |
/usr/lib64/ruby/gems/1.8/gems/chef-0.7.10/lib/chef/runner.rb:83:in `each' | |
/usr/lib64/ruby/gems/1.8/gems/chef-0.7.10/lib/chef/runner.rb:83:in `converge' | |
/usr/lib64/ruby/gems/1.8/gems/chef-0.7.10/lib/chef/resource_collection.rb:58:in `each' | |
/usr/lib64/ruby/gems/1.8/gems/chef-0.7.10/lib/chef/resource_collection.rb:57:in `each' | |
/usr/lib64/ruby/gems/1.8/gems/chef-0.7.10/lib/chef/runner.rb:61:in `converge' | |
/usr/lib64/ruby/gems/1.8/gems/chef-0.7.10/lib/chef/client.rb:382:in `converge' | |
/usr/lib64/ruby/gems/1.8/gems/chef-0.7.10/lib/chef/client.rb:82:in `run' | |
/usr/lib64/ruby/gems/1.8/gems/chef-0.7.10/lib/chef/application/client.rb:186:in `run_application' | |
/usr/lib64/ruby/gems/1.8/gems/chef-0.7.10/lib/chef/application/client.rb:178:in `loop' | |
/usr/lib64/ruby/gems/1.8/gems/chef-0.7.10/lib/chef/application/client.rb:178:in `run_application' | |
/usr/lib64/ruby/gems/1.8/gems/chef-0.7.10/lib/chef/application.rb:57:in `run' | |
/usr/lib64/ruby/gems/1.8/gems/chef-0.7.10/bin/chef-client:26 | |
/usr/bin/chef-client:19:in `load' | |
/usr/bin/chef-client:19 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment