5 # Copyright:: 2010, Tom Hughes
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
11 # https://www.apache.org/licenses/LICENSE-2.0
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.
24 update-notifier-common
27 file "/etc/motd.tail" do
31 # FIXME: cleanup old package pin method for cciss-vol-status
32 file "/etc/apt/preferences.d/99-chef" do
36 apt_preference "cciss-vol-status" do
37 pin "origin *.ubuntu.com"
41 apt_update "/etc/apt/sources.list" do
46 archive_host = if node[:country]
47 "#{node[:country]}.archive.ubuntu.com"
51 archive_security_host = "security.ubuntu.com"
52 archive_distro = "ubuntu"
54 archive_host = "ports.ubuntu.com"
55 archive_security_host = archive_host
56 archive_distro = "ubuntu-ports"
59 template "/etc/apt/sources.list" do
60 source "sources.list.erb"
64 variables :archive_host => archive_host, :archive_security_host => archive_security_host, :archive_distro => archive_distro, :codename => node[:lsb][:codename]
65 notifies :update, "apt_update[/etc/apt/sources.list]", :immediately
68 apt_repository "openstreetmap" do
69 uri "ppa:osmadmins/ppa"
72 package "unattended-upgrades"
74 if Dir.exist?("/usr/share/unattended-upgrades")
75 auto_upgrades = if node[:apt][:unattended_upgrades][:enable]
76 IO.read("/usr/share/unattended-upgrades/20auto-upgrades")
78 IO.read("/usr/share/unattended-upgrades/20auto-upgrades-disabled")
81 file "/etc/apt/apt.conf.d/20auto-upgrades" do
89 template "/etc/apt/apt.conf.d/60chef" do