Index: /trunk/chef-repo/cookbooks/munin/attributes/default.rb =================================================================== --- /trunk/chef-repo/cookbooks/munin/attributes/default.rb (revision 799) +++ /trunk/chef-repo/cookbooks/munin/attributes/default.rb (revision 800) @@ -24,4 +24,6 @@ default['munin']['web_server'] = 'apache' default['munin']['web_server_port'] = 80 + +default_unless['munin']['extra_servers'] = [] case node[:platform] Index: /trunk/chef-repo/cookbooks/munin/recipes/client.rb =================================================================== --- /trunk/chef-repo/cookbooks/munin/recipes/client.rb (revision 799) +++ /trunk/chef-repo/cookbooks/munin/recipes/client.rb (revision 800) @@ -19,4 +19,9 @@ munin_servers = search(:node, "role:#{node['munin']['server_role']} AND chef_environment:#{node.chef_environment}") +node['munin']['extra_servers'].each do |srv| + search(:node, "name:#{srv}").each do |n| + munin_servers << n + end +end package "munin-node" Index: /trunk/chef-repo/cookbooks/munin/templates/default/munin-node.conf.erb =================================================================== --- /trunk/chef-repo/cookbooks/munin/templates/default/munin-node.conf.erb (revision 799) +++ /trunk/chef-repo/cookbooks/munin/templates/default/munin-node.conf.erb (revision 800) @@ -37,5 +37,5 @@ # the allow line as many times as you'd like -<% @munin_servers.sort.each do |server| -%> +<% @munin_servers.each do |server| -%> allow ^<%= server[:ipaddress].to_s.gsub(/\./, '\.') %>$ <% end -%>
Attachment:
signature.asc
Description: PGP signature
Archive powered by MHonArc 2.6.16.