Skip to content

Commit

Permalink
Rhel9 repo updates (#217)
Browse files Browse the repository at this point in the history
* updated repo's for el9

* added var to avoid rhsm unsub

* pulled out broken rhel7 repo

* another place to remove broken optional repos for rhel7

* Update gem dependencies and use Puppet 8 by default (#212)

* Version bump to resolve mis-tagging (#214)

* updated README.md

---------

Co-authored-by: Rick Gardner <[email protected]>
Co-authored-by: Steven Pritchard <[email protected]>
  • Loading branch information
3 people authored Nov 29, 2023
1 parent 2633498 commit e4369a9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Methods to assist beaker acceptance tests for SIMP.
* [BEAKER_RHSM_USER](#beaker_rhsm_user)
* [BEAKER_RHSM_PASS](#beaker_rhsm_pass)
* [BEAKER_inspec_version](#beaker_inspec_version)
* [BEAKER_RHSM_UNSUBSCRIBE](#beaker_rhsm_unsubscribe)
* [Examples](#examples)
* [Prep OS, Generate and copy PKI certs to each SUT](#prep-os-generate-and-copy-pki-certs-to-each-sut)
* [Specify the version of Puppet to run in the SUTs](#specify-the-version-of-puppet-to-run-in-the-suts)
Expand Down Expand Up @@ -466,6 +467,12 @@ The version of InSpec to use when running inspec tests. Currently hard-coded to

Set to 'latest' to use the latest available in the upstream repos.

#### BEAKER_RHSM_UNSUBSCRIBE

By default the system is unsubscribed from RHSM.

Set to 'False' to disable this behavior.

## Examples

### Prep OS, Generate and copy PKI certs to each SUT
Expand Down
10 changes: 7 additions & 3 deletions lib/simp/beaker_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,6 @@ def enable_epel_on(suts)

if os_info['name'] == 'RedHat' && ENV['BEAKER_RHSM_USER'] && ENV['BEAKER_RHSM_PASS']
if os_maj_rel == '7'
on sut, %{subscription-manager repos --enable "rhel-*-optional-rpms"}
on sut, %{subscription-manager repos --enable "rhel-*-extras-rpms"}
on sut, %{subscription-manager repos --enable "rhel-ha-for-rhel-*-server-rpms"}
end
Expand Down Expand Up @@ -800,7 +799,9 @@ def linux_errata( suts )

RSpec.configure do |c|
c.after(:all) do
rhel_rhsm_unsubscribe(sut)
unless ENV['BEAKER_RHSM_UNSUBSCRIBE'] == 'false'
rhel_rhsm_unsubscribe(sut)
end
end
end
end
Expand Down Expand Up @@ -846,14 +847,17 @@ def rhel_rhsm_subscribe(suts, *opts)
:repo_list => {
'7' => [
'rhel-7-server-extras-rpms',
'rhel-7-server-optional-rpms',
'rhel-7-server-rh-common-rpms',
'rhel-7-server-rpms',
'rhel-7-server-supplementary-rpms'
],
'8' => [
'rhel-8-for-x86_64-baseos-rpms',
'rhel-8-for-x86_64-supplementary-rpms'
],
'9' => [
'rhel-9-for-x86_64-appstream-rpms',
'rhel-9-for-x86_64-baseos-rpms'
]
}
}
Expand Down

0 comments on commit e4369a9

Please sign in to comment.