Skip to content

Commit

Permalink
fixing cook-646
Browse files Browse the repository at this point in the history
  • Loading branch information
lusis committed Jul 18, 2011
1 parent 52d1341 commit 887395e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions nagios/templates/default/hosts.cfg.erb
Original file line number Diff line number Diff line change
@@ -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'] %>
Expand All @@ -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.