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 # http://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.
21 package "update-notifier-common"
23 file "/etc/motd.tail" do
27 execute "apt-update" do
29 command "/usr/bin/apt-get update"
32 template "/etc/apt/sources.list" do
33 source "sources.list.erb"
37 notifies :run, "execute[apt-update]", :immediately
40 if node[:lsb][:release].to_f >= 16.04
41 apt_source "brightbox-ruby-ng" do
45 apt_source "brightbox-ruby-ng" do
46 url "http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu"
51 apt_source "ubuntugis-stable" do
52 url "http://ppa.launchpad.net/ubuntugis/ppa/ubuntu"
56 apt_source "ubuntugis-unstable" do
57 url "http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu"
61 apt_source "openstreetmap" do
62 url "http://ppa.launchpad.net/osmadmins/ppa/ubuntu"
66 apt_source "management-component-pack" do
67 template "hp.list.erb"
68 url "http://downloads.linux.hpe.com/SDR/repo/mcp"
72 apt_source "hwraid" do
73 template "hwraid.list.erb"
74 url "http://hwraid.le-vert.net/ubuntu"
78 apt_source "mapnik-v210" do
79 url "http://ppa.launchpad.net/mapnik/v2.1.0/ubuntu"
84 template "nginx.list.erb"
85 url "http://nginx.org/packages/ubuntu"
89 apt_source "elasticsearch" do
90 template "elasticsearch.list.erb"
91 url "http://packages.elasticsearch.org/elasticsearch/1.7/debian"
95 apt_source "logstash" do
96 template "elasticsearch.list.erb"
97 url "http://packages.elasticsearch.org/logstash/1.5/debian"
101 apt_source "logstash-forwarder" do
102 template "elasticsearch.list.erb"
103 url "http://packages.elasticsearch.org/logstashforwarder/debian"
107 apt_source "passenger" do
108 url "https://oss-binaries.phusionpassenger.com/apt/passenger"
112 apt_source "postgresql" do
113 template "postgresql.list.erb"
114 url "http://apt.postgresql.org/pub/repos/apt"
118 apt_source "mediawiki" do
119 template "mediawiki.list.erb"
120 url "https://releases.wikimedia.org/debian"
121 key "664C383A3566A3481B942F007A322AC6E84AFDD2"
124 package "unattended-upgrades"
126 auto_upgrades = if node[:apt][:unattended_upgrades][:enable]
127 IO.read("/usr/share/unattended-upgrades/20auto-upgrades")
129 IO.read("/usr/share/unattended-upgrades/20auto-upgrades-disabled")
132 file "/etc/apt/apt.conf.d/20auto-upgrades" do
136 content auto_upgrades
139 template "/etc/apt/apt.conf.d/60chef" do
140 source "apt.conf.erb"