X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/bfd0f6bf2cc877667f039f2fc4a1e34e1dd7cd39..2361839bd17418a08d62c34e126d8ba54d07ab9d:/cookbooks/tools/recipes/default.rb diff --git a/cookbooks/tools/recipes/default.rb b/cookbooks/tools/recipes/default.rb index a4dc20c30..ceb3716c5 100644 --- a/cookbooks/tools/recipes/default.rb +++ b/cookbooks/tools/recipes/default.rb @@ -1,8 +1,8 @@ # -# Cookbook Name:: tools +# Cookbook:: tools # Recipe:: default # -# Copyright 2011, OpenStreetMap Foundation +# Copyright:: 2011, OpenStreetMap Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -35,6 +35,7 @@ package %w[ iotop lvm2 rsyslog + cron ] service "rsyslog" do @@ -42,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. +link "/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