Permalink
Browse files

Merge pull request #23 from mojolingo/master

Allow configuring caching using attributes
  • Loading branch information...
2 parents 8ad174d + 874e613 commit afe7e38eca17f6c1c77ed0781f1fe51f0deecf06 @jtimberman jtimberman committed Feb 9, 2013
Showing with 11 additions and 5 deletions.
  1. +2 −0 attributes/default.rb
  2. +5 −1 recipes/repoforge.rb
  3. +2 −2 templates/default/yum-rhel5.conf.erb
  4. +2 −2 templates/default/yum-rhel6.conf.erb
@@ -26,3 +26,5 @@
default['yum']['proxy'] = ''
default['yum']['proxy_username'] = ''
default['yum']['proxy_password'] = ''
+default['yum']['cachedir'] = '/var/cache/yum'
+default['yum']['keepcache'] = 0
@@ -19,7 +19,11 @@
include_recipe "yum::epel"
-major = node['platform_version'].to_i
+if platform?("amazon")
+ major = '6'
+else
+ major = node['platform_version'].to_i
+end
if node['kernel']['machine'] == "i686" && major == 5
arch = "i386"
@@ -1,8 +1,8 @@
# Generated by Chef for <%= node['fqdn'] %>
# Local modifications will be overwritten.
[main]
-cachedir=/var/cache/yum
-keepcache=0
+cachedir=<%= node['yum']['cachedir'] %>
+keepcache=<%= node['yum']['keepcache'] %>
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
@@ -1,8 +1,8 @@
# Generated by Chef for <%= node['fqdn'] %>
# Local modifications will be overwritten.
[main]
-cachedir=/var/cache/yum/$basearch/$releasever
-keepcache=0
+cachedir=<%= node['yum']['cachedir'] %>/$basearch/$releasever
+keepcache=<%= node['yum']['keepcache'] %>
debuglevel=2
logfile=/var/log/yum.log
exactarch=1

0 comments on commit afe7e38

Please sign in to comment.