Permalink
Browse files

fixing cook-646

  • Loading branch information...
1 parent 52d1341 commit 887395eacfb8b963e6c152dc72be67e39ec8336f @lusis lusis committed Jul 18, 2011
Showing with 9 additions and 0 deletions.
  1. +9 −0 nagios/templates/default/hosts.cfg.erb
View
9 nagios/templates/default/hosts.cfg.erb
@@ -1,7 +1,15 @@
# Generated by Chef
# host definitions
+define host {
+ use server
+ address <%= node['ipaddress'] %>
+ host_name <%= node['hostname'] %>
+ hostgroups <%= node['nagios']['server_role'] %>
+}
+
<% @nodes.each do |n| -%>
+<% unless n.name == node.name -%>
define host {
use server
address <%= n['ipaddress'] %>
@@ -12,5 +20,6 @@ define host {
hostgroups <%= n.run_list.roles.to_a.join(",") %>
<% end -%>
}
+<% end -%>
<% end -%>

0 comments on commit 887395e

Please sign in to comment.