Commit 32149b8f authored by Tim Smith's avatar Tim Smith Committed by Cameron Johnston
Browse files

Install yum-epel when necessary

Otherwise this cookbook doesn't work on older RHEL systems
parent c3085f98
......@@ -6,11 +6,7 @@ provisioner:
platforms:
- name: centos-5.11
run_list:
- recipe[yum-epel]
- name: centos-6.7
run_list:
- recipe[yum-epel]
- name: centos-7.2
- name: debian-7.9
run_list: apt::default
......
......@@ -5,7 +5,6 @@ metadata
group :integration do
cookbook 'apt'
cookbook 'yum'
cookbook 'yum-epel'
end
cookbook 'runit_test', path: 'test/cookbooks/runit_test'
......
......@@ -26,6 +26,7 @@ Requirements
#### Cookbooks
- packagecloud (for RHEL)
- yum-epel (for RHEL)
Attributes
----------
......
......@@ -13,6 +13,7 @@ recipe 'runit', 'Installs and configures runit'
end
depends 'packagecloud'
depends 'yum-epel'
source_url 'https://github.com/hw-cookbooks/runit' if respond_to?(:source_url)
issues_url 'https://github.com/hw-cookbooks/runit/issues' if respond_to?(:issues_url)
......@@ -39,7 +39,13 @@ end
case node['platform_family']
when 'rhel', 'fedora'
packagecloud_repo 'imeyer/runit' unless node['runit']['prefer_local_yum']
# add the necessary repos unless prefer_local_yum is set
unless node['runit']['prefer_local_yum']
include_recipe 'yum-epel' if node['platform_version'].to_i < 7
packagecloud_repo 'imeyer/runit'
end
package 'runit'
service 'runsvdir-start' do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment