X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/f963ff457182611c62036674840eb588b48fd704..aa02df0d2f61fb4d1839e1e9fca1ec95c249572a:/cookbooks/munin/recipes/default.rb diff --git a/cookbooks/munin/recipes/default.rb b/cookbooks/munin/recipes/default.rb index 36ddd96b4..fc457acdd 100644 --- a/cookbooks/munin/recipes/default.rb +++ b/cookbooks/munin/recipes/default.rb @@ -22,14 +22,16 @@ include_recipe "networking" package "munin-node" service "munin-node" do - if node[:lsb][:release].to_f >= 14.04 + if node[:lsb][:release].to_f >= 15.10 + provider Chef::Provider::Service::Systemd + elsif node[:lsb][:release].to_f >= 14.04 provider Chef::Provider::Service::Upstart end action [:enable, :start] supports :status => true, :restart => true, :reload => true end -servers = search(:node, "recipes:munin\\:\\:server") +servers = search(:node, "recipes:munin\\:\\:server") # ~FC010 servers.each do |server| server.interfaces(:role => :external) do |interface| @@ -180,6 +182,10 @@ munin_plugin "iostat" munin_plugin "iostat_ios" if Dir.glob("/dev/ipmi*").empty? + munin_plugin_conf "ipmi" do + action :delete + end + munin_plugin "ipmi_fans" do action :delete end @@ -193,6 +199,10 @@ if Dir.glob("/dev/ipmi*").empty? only_if { node[:lsb][:release].to_f >= 14.04 } end else + munin_plugin_conf "ipmi" do + template "ipmi.erb" + end + munin_plugin "ipmi_fans" do target "ipmi_" end