Commit 25d01692 authored by Tim Smith's avatar Tim Smith
Browse files

Fully support Amazon Linux



Mostly working around bugs in packagecloud's resource
Signed-off-by: Tim Smith's avatarTim Smith <tsmith@chef.io>
parent 594af7f5
......@@ -8,6 +8,9 @@ verifier:
name: inspec
platforms:
- name: amazonlinux
driver_config:
box: mvbcoding/awslinux
- name: centos-6
- name: centos-7
- name: debian-7
......
......@@ -36,7 +36,7 @@ when 'debian'
default['runit']['reload'] = 'reload runsvdir'
end
when 'rhel', 'fedora'
when 'rhel', 'fedora', 'amazon'
default['runit']['sv_bin'] = '/sbin/sv'
default['runit']['chpst_bin'] = '/sbin/chpst'
default['runit']['service_dir'] = '/etc/service'
......
......@@ -27,14 +27,16 @@ execute 'start-runsvdir' do
end
case node['platform_family']
when 'rhel'
when 'rhel', 'amazon'
# 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' do
force_os 'rhel' if node['platform'].eql?('oracle')
force_os 'rhel' if platform?('oracle', 'amazon')
force_dist '6' if platform?('amazon')
type 'rpm' if platform?('amazon')
end
end
......
......@@ -22,7 +22,7 @@ include_recipe 'runit::default'
link '/usr/local/bin/sv' do
to value_for_platform_family(
'default' => '/usr/bin/sv',
%w(rhel fedora) => '/sbin/sv'
%w(rhel fedora amazon) => '/sbin/sv'
)
end
......
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