Fix CentOS Stream 9 repo url

Change-Id: Id02b6e67af7a8cab524af86e2d4eab6a6281ed2d
This commit is contained in:
Tobias Urdin
2022-04-18 21:14:50 +00:00
committed by Tobias Urdin
parent 82343e1cda
commit 039ef5e19a
2 changed files with 28 additions and 2 deletions

View File

@@ -133,7 +133,12 @@ not on ${::operatingsystem}, which can lead to packaging issues.")
} else {
# NOTE(tobias-urdin): mirror.centos.org doesnt have https support
if $stream {
$ceph_mirror_real = "http://mirror.centos.org/centos/${::operatingsystemmajrelease}-stream/storage/x86_64/ceph-${release}/"
if versioncmp($::operatingsystemmajrelease, '9') >= 0 {
$centos_mirror = 'mirror.stream.centos.org/SIGs'
} else {
$centos_mirror = 'mirror.centos.org/centos'
}
$ceph_mirror_real = "http://${centos_mirror}/${::operatingsystemmajrelease}-stream/storage/x86_64/ceph-${release}/"
} else {
$ceph_mirror_real = "http://mirror.centos.org/centos/${::operatingsystemmajrelease}/storage/x86_64/ceph-${release}/"
}

View File

@@ -509,7 +509,11 @@ describe 'ceph::repo' do
)}
end
context 'when using CentOS SIG repository and CentOS Stream' do
context 'when using CentOS SIG repository and CentOS Stream 8' do
before do
facts.merge!( :operatingsystemmajrelease => "8" )
end
let :params do
{
:enable_sig => true,
@@ -527,6 +531,23 @@ describe 'ceph::repo' do
)}
end
context 'when using CentOS SIG repository and CentOS Stream 9' do
before do
facts.merge!( :operatingsystemmajrelease => "9" )
end
let :params do
{
:enable_sig => true,
:stream => true,
}
end
it { should contain_yumrepo('ceph-storage-sig').with(
:baseurl => 'http://mirror.stream.centos.org/SIGs/9-stream/storage/x86_64/ceph-nautilus/',
)}
end
context 'when using CentOS SIG repository from a mirror' do
let :params do
{