# DO NOT EDIT - This file is being maintained by Chef
-<% if node[:lsb][:release].to_f < 14.04 -%>
-deb <%= @url %> precise/current non-free
-<% else -%>
deb <%= @url %> trusty/current non-free
-<% end -%>
# DO NOT EDIT - This file is being maintained by Chef
-<% if node[:lsb][:release].to_f > 12.04 -%>
deb <%= @url %> precise main
deb-src <%= @url %> precise main
-<% else -%>
-deb <%= @url %> <%= node[:lsb][:codename] %> main
-deb-src <%= @url %> <%= node[:lsb][:codename] %> main
-<% 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"
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
mode 0o2775
end
-ruby_version = if node[:lsb][:release].to_f >= 16.04
- "2.3"
- else
- "2.1"
- end
-
rails_port "www.openstreetmap.org" do
- ruby ruby_version
+ ruby "2.3"
directory "/srv/www.openstreetmap.org/rails"
user "rails"
group "rails"
<% end -%>
<% end -%>
<% end -%>
-<% if node[:lsb][:release] == "12.04" && Chef::Util.compare_versions(node[:kernel][:release], [3, 11]) >= 0 -%>
-
-# Rule from 14.04 udev for 12.04 machines running newer kernels
-ACTION=="add", SUBSYSTEM=="cpu", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe -bv $env{MODALIAS}"
-<% end -%>
# Disable scatter-gather offload for HP NC362i network controllers
SUBSYSTEM=="net", ACTION=="add", ATTRS{vendor}=="0x8086", ATTRS{device}=="0x10c9", ATTRS{subsystem_vendor}=="0x103c", ATTRS{subsystem_device}=="0x323f", RUN+="/sbin/ethtool -K $name gso off tso off sg off gro off"
# testing for an empty sending host field.
accept hosts = :
-<% if node[:lsb][:release].to_i >= 10.04 -%>
control = dkim_disable_verify
-<% end -%>
#############################################################################
# The following section of the ACL is concerned with local parts that contain
accept hosts = +relay_from_hosts
control = submission
-<% if node[:lsb][:release].to_i >= 10.04 -%>
control = dkim_disable_verify
-<% end -%>
# Accept if the message arrived over an authenticated connection, from
# any host. Again, these messages are usually from MUAs, so recipient
accept authenticated = *
control = submission
-<% if node[:lsb][:release].to_i >= 10.04 -%>
control = dkim_disable_verify
-<% end -%>
# Insist that any other recipient address that we accept is either in one of
# our local domains, or is in a domain for which we explicitly allow
package "fail2ban"
-if node[:lsb][:release].to_f >= 14.04
- file "/etc/fail2ban/jail.local" do
- action :delete
- end
-else
- directory "/etc/fail2ban/jail.d" do
- owner "root"
- group "root"
- mode 0o755
- end
-
- template "/etc/fail2ban/jail.local" do
- source "jail.local.erb"
- owner "root"
- group "root"
- mode 0o644
- subscribes :create, "template[/etc/fail2ban/jail.d/00-default.conf]"
- notifies :reload, "service[fail2ban]"
- end
-end
-
template "/etc/fail2ban/jail.d/00-default.conf" do
source "jail.default.erb"
owner "root"
attribute :maxretry, :kind_of => Integer
def after_created
- if node[:lsb][:release].to_f >= 14.04
- notifies :reload, "service[fail2ban]"
- else
- notifies :create, "template[/etc/fail2ban/jail.local]"
- end
+ notifies :reload, "service[fail2ban]"
end
+++ /dev/null
-# DO NOT EDIT - This file is being maintained by Chef
-<% Dir.glob("/etc/fail2ban/jail.d/*.conf").sort do |file| -%>
-
-<%= File.read(file) %>
-<% end -%>
case node[:cpu][:"0"][:vendor_id]
when "GenuineIntel"
package "intel-microcode"
-end
-
-case node[:cpu][:"0"][:vendor_id]
when "AuthenticAMD"
- package "amd64-microcode" if node[:lsb][:release].to_f >= 14.04
+ package "amd64-microcode"
end
if node[:dmi] && node[:dmi][:system]
package "ipmitool" if node[:kernel][:modules].include?("ipmi_si")
-if node[:lsb][:release].to_f >= 12.10
- package "irqbalance"
+package "irqbalance"
- template "/etc/default/irqbalance" do
- source "irqbalance.erb"
- owner "root"
- group "root"
- mode 0o644
- end
+template "/etc/default/irqbalance" do
+ source "irqbalance.erb"
+ owner "root"
+ group "root"
+ mode 0o644
+end
- service "irqbalance" do
- action [:start, :enable]
- supports :status => false, :restart => true, :reload => false
- subscribes :restart, "template[/etc/default/irqbalance]"
- end
+service "irqbalance" do
+ action [:start, :enable]
+ supports :status => false, :restart => true, :reload => false
+ subscribes :restart, "template[/etc/default/irqbalance]"
end
# Link Layer Discovery Protocol Daemon
mode 0o644
end
-if node[:lsb][:release].to_f <= 12.10
- service "module-init-tools" do
- provider Chef::Provider::Service::Upstart
- action :nothing
- subscribes :start, "template[/etc/modules]"
- end
-else
- service "kmod" do
- if node[:lsb][:release].to_f >= 15.10
- provider Chef::Provider::Service::Systemd
- else
- provider Chef::Provider::Service::Upstart
- end
- action :nothing
- subscribes :start, "template[/etc/modules]"
- end
+service "kmod" do
+ action :nothing
+ subscribes :start, "template[/etc/modules]"
end
if node[:hardware][:watchdog]
# Send console output to the screen
GRUB_TERMINAL="console"
<% else -%>
-<% if node[:lsb][:release].to_f >= 12.04 -%>
# Send console output to the screen and serial port
GRUB_TERMINAL="console serial"
-<% else -%>
-# Send console output to the serial port
-GRUB_TERMINAL="serial"
-<% end -%>
# Configure the serial console
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=<%= @units.first %> --word=8 --parity=no --stop=1"
~FC001
~FC003
+~FC005
~FC064
~FC065
package "munin-node"
service "munin-node" do
- if node[:lsb][:release].to_f >= 15.10
- provider Chef::Provider::Service::Systemd
- elsif node[:lsb][:release].to_f >= 14.04
- provider Chef::Provider::Service::Upstart
- end
action [:enable, :start]
supports :status => true, :restart => true, :reload => true
end
munin_plugin "ipmi_power" do
action :delete
- only_if { node[:lsb][:release].to_f >= 14.04 }
end
else
munin_plugin_conf "ipmi" do
munin_plugin "ipmi_power" do
target "ipmi_"
- only_if { node[:lsb][:release].to_f >= 14.04 }
end
end
package "openssh-server"
service "ssh" do
- if node[:lsb][:release].to_f >= 15.10
- provider Chef::Provider::Service::Systemd
- elsif node[:lsb][:release].to_f >= 14.04
- provider Chef::Provider::Service::Upstart
- end
action [:enable, :start]
supports :status => true, :restart => true, :reload => true
end
package "sysv-rc-conf"
package "iotop"
package "lvm2"
-
-package "lslk" if node[:lsb][:release].to_f <= 11.04
-
package "rsyslog"
service "rsyslog" do