Skip to content
This repository has been archived by the owner on May 14, 2021. It is now read-only.

Add support for RHEL instances in AWS #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions lib/poise_languages/scl/resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,16 @@ def install_scl_repo
# NOTE: THIS IS NOT TESTED BECAUSE REDHAT DOESN'T OFFER ANY WAY TO DO
# AUTOMATED TESTING. IF YOU USE REDHAT AND THIS BREAKS, PLEASE LET ME
# KNOW BY FILING A GITHUB ISSUE AT http://github.com/poise/poise-languages/issues/new.
repo_name = "rhel-server-rhscl-#{node['platform_version'][0]}-rpms"
execute "subscription-manager repos --enable #{repo_name}" do
not_if { shell_out!('subscription-manager repos --list-enabled').stdout.include?(repo_name) }
if node['cloud']['provider'] == 'ec2'
repo_name = "rhui-REGION-rhel-server-rhscl"
execute "yum-config-manager --quiet --enable #{repo_name}" do
not_if { shell_out!('yum repolist').stdout.include?(repo_name) }
end
else
repo_name = "rhel-server-rhscl-#{node['platform_version'][0]}-rpms"
execute "subscription-manager repos --enable #{repo_name}" do
not_if { shell_out!('subscription-manager repos --list-enabled').stdout.include?(repo_name) }
end
end
else
package 'centos-release-scl-rh' do
Expand Down