]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/ntp/recipes/default.rb
Add test for fail2ban cookbook
[chef.git] / cookbooks / ntp / recipes / default.rb
index 0abd9a4f640143d981aec325f354626cdd57b3fa..dd4a04ebf54d3b5f1e11be0b95d077b96265790c 100644 (file)
@@ -1,9 +1,9 @@
 #
-# Cookbook Name:: ntp
+# Cookbook:: ntp
 # Recipe:: default
 #
-# Copyright 2010, OpenStreetMap Foundation.
-# Copyright 2009, Opscode, Inc
+# Copyright:: 2010, OpenStreetMap Foundation.
+# Copyright:: 2009, Opscode, Inc
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -44,6 +44,17 @@ template "/etc/chrony/chrony.conf" do
   notifies :restart, "service[chrony]"
 end
 
+service "systemd-timesyncd" do
+  action [:stop, :disable]
+end
+
+systemd_service "chrony-restart" do
+  service "chrony"
+  dropin "restart"
+  restart "on-failure"
+  notifies :restart, "service[chrony]"
+end
+
 service "chrony" do
   action [:enable, :start]
 end