Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'COOK-476'

  • Loading branch information...
commit d101a72aa39eb217bfe7f5cbb5b2766fdf4998eb 2 parents 25215ee + 5407264
@mattray mattray authored
Showing with 9 additions and 2 deletions.
  1. +1 −1  apt/metadata.rb
  2. +8 −1 apt/recipes/cacher-client.rb
View
2  apt/metadata.rb
@@ -3,7 +3,7 @@
license "Apache 2.0"
description "Configures apt and apt services and an LWRP for managing apt repositories"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
-version "1.1.1"
+version "1.1.2"
recipe "apt", "Runs apt-get update during compile phase and sets up preseed directories"
recipe "apt::cacher", "Set up an APT cache"
recipe "apt::cacher-client", "Client for the apt::cacher server"
View
9 apt/recipes/cacher-client.rb
@@ -17,10 +17,17 @@
# limitations under the License.
#
+#remove Acquire::http::Proxy lines from /etc/apt/apt.conf since we use 01proxy
+#these are leftover from preseed installs
+execute "Remove proxy from /etc/apt/apt.conf" do
+ command "sed --in-place '/^Acquire::http::Proxy/d' /etc/apt/apt.conf"
+ only_if "grep Acquire::http::Proxy /etc/apt/apt.conf"
+end
+
servers = search(:node, 'recipes:apt\:\:cacher') || []
if servers.length > 0
Chef::Log.info("apt-cacher server found on #{servers[0]}.")
- proxy = "Acquire::http::Proxy \"http://#{servers[0].ipaddress}:3142\";"
+ proxy = "Acquire::http::Proxy \"http://#{servers[0].ipaddress}:3142\";\n"
file "/etc/apt/apt.conf.d/01proxy" do
owner "root"
group "root"
Please sign in to comment.
Something went wrong with that request. Please try again.