]> git.openstreetmap.org Git - chef.git/blob - cookbooks/tools/recipes/default.rb
Drop OCSP checks as letsencrypt is dropping OCSP
[chef.git] / cookbooks / tools / recipes / default.rb
1 #
2 # Cookbook:: tools
3 # Recipe:: default
4 #
5 # Copyright:: 2011, OpenStreetMap Foundation
6 #
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
10 #
11 #     https://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 #
19
20 package %w[
21   bash-completion
22   cron
23   curl
24   dmidecode
25   ethtool
26   iotop
27   iptraf-ng
28   locales-all
29   lsof
30   lsscsi
31   lvm2
32   mtr-tiny
33   numactl
34   pciutils
35   rsync
36   rsyslog
37   screen
38   smartmontools
39   strace
40   sysstat
41   systemd-coredump
42   tcpdump
43   usbutils
44   vim
45   xfsprogs
46   zstd
47 ]
48
49 service "rsyslog" do
50   action [:enable, :start]
51   supports :status => true, :restart => true, :reload => true
52 end
53
54 # Remove some unused and unwanted packages
55 package %w[mlocate whoopsie] do
56   action :purge
57 end
58
59 # Configure cron to run in the local timezone of the machine
60 systemd_service "cron-timezone" do
61   service "cron"
62   dropin "timezone"
63   environment "TZ" => node[:timezone]
64   notifies :restart, "service[cron]"
65   only_if { node[:timezone] }
66 end
67
68 # Configure cron with lower cpu and IO priority
69 if node[:tools][:cron][:load]
70   systemd_service "cron-load" do
71     service "cron"
72     dropin "load"
73     nice node[:tools][:cron][:load][:nice]
74     io_scheduling_class node[:tools][:cron][:load][:io_scheduling_class]
75     io_scheduling_priority node[:tools][:cron][:load][:io_scheduling_priority]
76     notifies :restart, "service[cron]"
77   end
78 end
79
80 # Make sure cron is running
81 service "cron" do
82   action [:enable, :start]
83 end
84
85 # Ubuntu MOTD adverts be-gone
86 template "/etc/default/motd-news" do
87   source "motd-news.erb"
88   owner "root"
89   group "root"
90   mode "644"
91 end