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
Add support for RHEL instances in AWS
AWS instances have a different repo structure and cannot be managed
with the subscription manager utils
Topher Cullen committed Jun 5, 2017
commit 811af781cc9c488f0d27f8c57b6b564ab2d261e5
13 changes: 10 additions & 3 deletions lib/poise_languages/scl/resource.rb
Original file line number Diff line number Diff line change
@@ -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