summaryrefslogtreecommitdiff
path: root/kitchen-tests/cookbooks/base
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2016-08-10 10:58:28 +0100
committerThom May <thom@chef.io>2016-08-24 10:17:12 +0100
commit62c04b47128009f80024226b1eb75a9f9f9db8c9 (patch)
tree9481a94ad554473e27e4f591d833169cd5622b12 /kitchen-tests/cookbooks/base
parentb1913dd1cc18448a2cbda81ef40886708b1ca6d0 (diff)
downloadchef-62c04b47128009f80024226b1eb75a9f9f9db8c9.tar.gz
Create and delete yum repositories
Signed-off-by: Thom May <thom@may.lt>
Diffstat (limited to 'kitchen-tests/cookbooks/base')
-rw-r--r--kitchen-tests/cookbooks/base/metadata.rb1
-rw-r--r--kitchen-tests/cookbooks/base/recipes/default.rb10
2 files changed, 8 insertions, 3 deletions
diff --git a/kitchen-tests/cookbooks/base/metadata.rb b/kitchen-tests/cookbooks/base/metadata.rb
index 3811fe914d..32ea03916f 100644
--- a/kitchen-tests/cookbooks/base/metadata.rb
+++ b/kitchen-tests/cookbooks/base/metadata.rb
@@ -22,4 +22,3 @@ depends "selinux"
depends "sudo"
depends "ubuntu"
depends "users"
-depends "yum-epel"
diff --git a/kitchen-tests/cookbooks/base/recipes/default.rb b/kitchen-tests/cookbooks/base/recipes/default.rb
index 053a689b27..2499dcb814 100644
--- a/kitchen-tests/cookbooks/base/recipes/default.rb
+++ b/kitchen-tests/cookbooks/base/recipes/default.rb
@@ -16,8 +16,14 @@ if %w{rhel fedora}.include?(node["platform_family"])
include_recipe "selinux::disabled"
end
-if node["platform_family"] == "rhel"
- include_recipe "yum-epel"
+yum_repository "epel" do
+ enabled true
+ description "Extra Packages for Enterprise Linux #{node['platform_version'].to_i} - $basearch"
+ failovermethod "priority"
+ gpgkey "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-#{node['platform_version'].to_i}"
+ gpgcheck true
+ mirrorlist "https://mirrors.fedoraproject.org/metalink?repo=epel-#{node['platform_version'].to_i}&arch=$basearch"
+ only_if { node["platform_family"] == "rhel" }
end
include_recipe "build-essential"