laradji/zabbix — pull request #10 by amiando (2012-07-25 18:13:20+00:00)
Title: Fix for FATAL: Chef::Mixin::Template::TemplateError: undefined method `each' for "zabbix":String

[2012-07-25T19:54:36+02:00] INFO: Processing template[/etc/apache2/sites-available/file.conf] action create (zabbix::web line 29)

================================================================================
Error executing action `create` on resource 'template[/etc/apache2/sites-available/file.conf]'
================================================================================

Chef::Mixin::Template::TemplateError
------------------------------------
undefined method `each' for "zabbix":String

Resource Declaration:
---------------------
# In /var/cache/chef-client/cookbooks/apache2/definitions/web_app.rb

28:
29: template "#{node['apache']['dir']}/sites-available/#{application_name}.conf" do
30: source params[:template]
31: owner "root"
32: group node['apache']['root_group']
33: mode 0644
34: if params[:cookbook]
35: cookbook params[:cookbook]
36: end
37: variables(

Compiled Resource:
------------------
# Declared in /var/cache/chef-client/cookbooks/apache2/definitions/web_app.rb:29:in `block in from_file'

template("/etc/apache2/sites-available/file.conf") do
params {:template=>"web_app.conf.erb", :enable=>true, :server_name=>"file", :server_aliases=>"zabbix", :docroot=>"/opt/zabbix/web", :only_if=>[], :name=>"file"}
provider Chef::Provider::Template
action "create"
retries 0
retry_delay 2
path "/etc/apache2/sites-available/file"
backup 5
source "web_app.conf.erb"
variables {:application_name=>"file", :params=>{:template=>"web_app.conf.erb", :enable=>true, :server_name=>"file", :server_aliases=>"zabbix", :docroot=>"/opt/zabbix/web", :only_if=>[], :name=>"file"}}
cookbook_name "zabbix"
recipe_name "web"
owner "root"
mode 420
group "root"
end

[2012-07-25T19:54:36+02:00] ERROR: Running exception handlers
[2012-07-25T19:54:36+02:00] FATAL: Saving node information to /var/cache/chef-client/failed-run-data.json
[2012-07-25T19:54:36+02:00] ERROR: Exception handlers complete
[2012-07-25T19:54:36+02:00] FATAL: Stacktrace dumped to /var/cache/chef-client/chef-stacktrace.out
[2012-07-25T19:54:36+02:00] FATAL: Chef::Mixin::Template::TemplateError: undefined method `each' for "zabbix":String