X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/18e12b0e123fc3e5f344682f884feabc12da0f5a..3cc3389c27f25ad1f6f4e956833578ebf4ad22f5:/cookbooks/tools/recipes/default.rb diff --git a/cookbooks/tools/recipes/default.rb b/cookbooks/tools/recipes/default.rb index b0dc2bb9c..4ab9414df 100644 --- a/cookbooks/tools/recipes/default.rb +++ b/cookbooks/tools/recipes/default.rb @@ -32,10 +32,10 @@ package %w[ usbutils numactl xfsprogs - sysv-rc-conf iotop lvm2 rsyslog + cron ] service "rsyslog" do @@ -43,12 +43,31 @@ service "rsyslog" do supports :status => true, :restart => true, :reload => true end -# Remove unused base package -package "mlocate" do +# Remove some unused and unwanted packages +package %w[mlocate nano whoopsie] do action :purge end -# Remove ubuntu "desktop" vestigal package -package "whoopsie" do - action :purge +# Remove screen-cleanup left behind by old release. +file "/etc/init.d/screen-cleanup" do + action :delete +end + +# Cleanup unused file +file "/etc/systemd/system/cron.service.d/chef.conf" do + action :delete +end + +# Configure cron to run in the local timezone of the machine +systemd_service "cron-timezone" do + service "cron" + dropin "timezone" + environment "TZ" => node[:timezone] + notifies :restart, "service[cron]" + only_if { node[:timezone] } +end + +# Make sure cron is running +service "cron" do + action [:enable, :start] end