Created
February 3, 2009 18:50
-
-
Save jsierles/57667 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
# | |
# Cookbook Name:: nagios | |
# Recipe:: server | |
# | |
# Copyright 2009, 37signals | |
# | |
# All rights reserved - Do Not Redistribute | |
# | |
package "nagios" do | |
package_name 'nagios3' | |
action :install | |
end | |
template "/etc/nagios3/nagios.cfg" do | |
owner "nagios" | |
group "nagios" | |
source "nagios.cfg.erb" | |
mode 0440 | |
end | |
template "/etc/nagios3/commands.cfg" do | |
owner "nagios" | |
group "nagios" | |
source "commands.cfg.erb" | |
mode 0440 | |
end | |
@hosts = search(:node, "*", %w(ipaddress hostname)) | |
template "/etc/nagios3/conf.d/hosts.cfg" do | |
owner "nagios" | |
group "nagios" | |
source "hosts.cfg.erb" | |
variables({:hosts => @hosts}) | |
mode 0440 | |
end | |
/var/chef/cache/cookbooks/nagios/recipes/server.rb:33:in `from_file': undefined method `search' for #<Chef::Resource::Template:0xb79926d8> (NoMethodError) | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.5.2/lib/chef/recipe.rb:188:in `instance_eval' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.5.2/lib/chef/recipe.rb:188:in `method_missing' | |
from /var/chef/cache/cookbooks/nagios/recipes/server.rb:29:in `from_file' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.5.2/lib/chef/cookbook.rb:139:in `load_recipe' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.5.2/lib/chef/compile.rb:106:in `load_recipes' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.5.2/lib/chef/compile.rb:101:in `each' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.5.2/lib/chef/compile.rb:101:in `load_recipes' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.5.2/lib/chef/client.rb:339:in `converge' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.5.2/lib/chef/client.rb:76:in `run' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.5.2/bin/chef-client:114 | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.5.2/bin/chef-client:108:in `loop' | |
from /usr/lib/ruby/gems/1.8/gems/chef-0.5.2/bin/chef-client:108 | |
from /usr/bin/chef-client:19:in `load' | |
from /usr/bin/chef-client:19 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment