]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/munin/recipes/default.rb
Use systemd to manage munin-node on Ubuntu 15.10
[chef.git] / cookbooks / munin / recipes / default.rb
index 3bffa27a6ed32869a20a874e46d0a5bcbf79a82e..fc457acdd5ff27f21ccb669134c0b1f89a218eef 100644 (file)
@@ -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|