]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/chef/recipes/default.rb
Remove no longer needed support for old Ubuntu versions
[chef.git] / cookbooks / chef / recipes / default.rb
index c06384be7a87f37930dac12c1e8c384a1c32d05a..9443d054848af99e118d17837d58a911cd1dda2e 100644 (file)
@@ -114,16 +114,6 @@ if node[:lsb][:release].to_f >= 15.10
     exec_start "/usr/bin/chef-client -i 1800 -s 20"
     restart "on-failure"
   end
     exec_start "/usr/bin/chef-client -i 1800 -s 20"
     restart "on-failure"
   end
-
-  service "chef-client" do
-    provider Chef::Provider::Service::Systemd
-    action [:enable, :start]
-    supports :status => true, :restart => true, :reload => true
-    subscribes :restart, "dpkg_package[chef]"
-    subscribes :restart, "systemd_service[chef-client]"
-    subscribes :restart, "template[/etc/chef/client.rb]"
-    subscribes :restart, "template[/etc/chef/report.rb]"
-  end
 else
   template "/etc/init/chef-client.conf" do
     source "chef-client.conf.erb"
 else
   template "/etc/init/chef-client.conf" do
     source "chef-client.conf.erb"
@@ -131,14 +121,13 @@ else
     group "root"
     mode 0o644
   end
     group "root"
     mode 0o644
   end
+end
 
 
-  service "chef-client" do
-    provider Chef::Provider::Service::Upstart
-    action [:enable, :start]
-    supports :status => true, :restart => true, :reload => true
-    subscribes :restart, "dpkg_package[chef]"
-    subscribes :restart, "template[/etc/init/chef-client.conf]"
-    subscribes :restart, "template[/etc/chef/client.rb]"
-    subscribes :restart, "template[/etc/chef/report.rb]"
-  end
+service "chef-client" do
+  action [:enable, :start]
+  supports :status => true, :restart => true, :reload => true
+  subscribes :restart, "dpkg_package[chef]"
+  subscribes :restart, "template[/etc/init/chef-client.conf]"
+  subscribes :restart, "template[/etc/chef/client.rb]"
+  subscribes :restart, "template[/etc/chef/report.rb]"
 end
 end