Merge "yumrepo: Replace old enabled parameter"
This commit is contained in:
commit
ac74f1c703
|
@ -119,8 +119,6 @@ class ceph::repo (
|
|||
}
|
||||
|
||||
'RedHat': {
|
||||
$enabled = $ensure ? { 'present' => '1', 'absent' => '0', default => absent, }
|
||||
|
||||
# If you want to deploy Ceph using packages provided by CentOS SIG
|
||||
# https://wiki.centos.org/SpecialInterestGroup/Storage/
|
||||
if $enable_sig {
|
||||
|
@ -143,18 +141,15 @@ not on ${facts['os']['name']}, which can lead to packaging issues.")
|
|||
$ceph_mirror_real = "http://mirror.centos.org/centos/${facts['os']['release']['major']}/storage/x86_64/ceph-${release}/"
|
||||
}
|
||||
}
|
||||
yumrepo { 'ceph-luminous-sig':
|
||||
ensure => 'absent',
|
||||
}
|
||||
yumrepo { 'ceph-storage-sig':
|
||||
enabled => '1',
|
||||
ensure => $ensure,
|
||||
baseurl => $ceph_mirror_real,
|
||||
descr => 'Ceph Storage SIG',
|
||||
mirrorlist => 'absent',
|
||||
gpgcheck => '0',
|
||||
}
|
||||
# Make sure we install the repo before any Package resource
|
||||
Yumrepo['ceph-luminous-sig'] -> Yumrepo['ceph-storage-sig'] -> Package<| tag == 'ceph' |>
|
||||
Yumrepo['ceph-storage-sig'] -> Package<| tag == 'ceph' |>
|
||||
} else {
|
||||
# If you want to deploy Ceph using packages provided by ceph.com repositories.
|
||||
$el = $facts['os']['release']['major']
|
||||
|
@ -167,40 +162,38 @@ not on ${facts['os']['name']}, which can lead to packaging issues.")
|
|||
|
||||
|
||||
yumrepo { 'ext-ceph':
|
||||
# puppet versions prior to 3.5 do not support ensure, use enabled instead
|
||||
enabled => $enabled,
|
||||
ensure => $ensure,
|
||||
descr => "External Ceph ${release}",
|
||||
name => "ext-ceph-${release}",
|
||||
baseurl => "http://download.ceph.com/rpm-${release}/el${el}/\$basearch",
|
||||
gpgcheck => '1',
|
||||
gpgkey => 'https://download.ceph.com/keys/release.asc',
|
||||
mirrorlist => absent,
|
||||
mirrorlist => 'absent',
|
||||
priority => '10', # prefer ceph repos over EPEL
|
||||
tag => 'ceph',
|
||||
}
|
||||
|
||||
yumrepo { 'ext-ceph-noarch':
|
||||
# puppet versions prior to 3.5 do not support ensure, use enabled instead
|
||||
enabled => $enabled,
|
||||
ensure => $ensure,
|
||||
descr => 'External Ceph noarch',
|
||||
name => "ext-ceph-${release}-noarch",
|
||||
baseurl => "http://download.ceph.com/rpm-${release}/el${el}/noarch",
|
||||
gpgcheck => '1',
|
||||
gpgkey => 'https://download.ceph.com/keys/release.asc',
|
||||
mirrorlist => absent,
|
||||
mirrorlist => 'absent',
|
||||
priority => '10', # prefer ceph repos over EPEL
|
||||
tag => 'ceph',
|
||||
}
|
||||
|
||||
if $fastcgi {
|
||||
yumrepo { 'ext-ceph-fastcgi':
|
||||
enabled => $enabled,
|
||||
ensure => $ensure,
|
||||
descr => 'FastCGI basearch packages for Ceph',
|
||||
name => 'ext-ceph-fastcgi',
|
||||
baseurl => "http://gitbuilder.ceph.com/mod_fastcgi-rpm-rhel${el}-x86_64-basic/ref/master",
|
||||
gpgcheck => '1',
|
||||
gpgkey => 'https://download.ceph.com/keys/autobuild.asc',
|
||||
mirrorlist => absent,
|
||||
mirrorlist => 'absent',
|
||||
priority => '20', # prefer ceph repos over EPEL
|
||||
tag => 'ceph',
|
||||
}
|
||||
|
@ -214,8 +207,7 @@ not on ${facts['os']['name']}, which can lead to packaging issues.")
|
|||
|
||||
if $enable_epel {
|
||||
yumrepo { "ext-epel-${el}":
|
||||
# puppet versions prior to 3.5 do not support ensure, use enabled instead
|
||||
enabled => $enabled,
|
||||
ensure => $ensure,
|
||||
descr => "External EPEL ${el}",
|
||||
name => "ext-epel-${el}",
|
||||
baseurl => absent,
|
||||
|
|
|
@ -98,7 +98,7 @@ describe 'ceph::repo' do
|
|||
shared_examples 'ceph::repo on RedHat' do
|
||||
context 'with default params' do
|
||||
it { should contain_yumrepo("ext-epel-#{facts[:os]['release']['major']}").with(
|
||||
:enabled => '1',
|
||||
:ensure => 'present',
|
||||
:descr => "External EPEL #{facts[:os]['release']['major']}",
|
||||
:name => "ext-epel-#{facts[:os]['release']['major']}",
|
||||
:baseurl => 'absent',
|
||||
|
@ -110,7 +110,7 @@ describe 'ceph::repo' do
|
|||
)}
|
||||
|
||||
it { should contain_yumrepo('ext-ceph').with(
|
||||
:enabled => '1',
|
||||
:ensure => 'present',
|
||||
:descr => 'External Ceph nautilus',
|
||||
:name => 'ext-ceph-nautilus',
|
||||
:baseurl => "http://download.ceph.com/rpm-nautilus/el#{facts[:os]['release']['major']}/$basearch",
|
||||
|
@ -121,7 +121,7 @@ describe 'ceph::repo' do
|
|||
)}
|
||||
|
||||
it { should contain_yumrepo('ext-ceph-noarch').with(
|
||||
:enabled => '1',
|
||||
:ensure => 'present',
|
||||
:descr => 'External Ceph noarch',
|
||||
:name => 'ext-ceph-nautilus-noarch',
|
||||
:baseurl => "http://download.ceph.com/rpm-nautilus/el#{facts[:os]['release']['major']}/noarch",
|
||||
|
@ -140,7 +140,7 @@ describe 'ceph::repo' do
|
|||
end
|
||||
|
||||
it { should contain_yumrepo("ext-epel-#{facts[:os]['release']['major']}").with(
|
||||
:enabled => '1',
|
||||
:ensure => 'present',
|
||||
:descr => "External EPEL #{facts[:os]['release']['major']}",
|
||||
:name => "ext-epel-#{facts[:os]['release']['major']}",
|
||||
:baseurl => 'absent',
|
||||
|
@ -152,7 +152,7 @@ describe 'ceph::repo' do
|
|||
)}
|
||||
|
||||
it { should contain_yumrepo('ext-ceph').with(
|
||||
:enabled => '1',
|
||||
:ensure => 'present',
|
||||
:descr => 'External Ceph firefly',
|
||||
:name => 'ext-ceph-firefly',
|
||||
:baseurl => "http://download.ceph.com/rpm-firefly/el#{facts[:os]['release']['major']}/$basearch",
|
||||
|
@ -163,7 +163,7 @@ describe 'ceph::repo' do
|
|||
)}
|
||||
|
||||
it { should contain_yumrepo('ext-ceph-noarch').with(
|
||||
:enabled => '1',
|
||||
:ensure => 'present',
|
||||
:descr => 'External Ceph noarch',
|
||||
:name => 'ext-ceph-firefly-noarch',
|
||||
:baseurl => "http://download.ceph.com/rpm-firefly/el#{facts[:os]['release']['major']}/noarch",
|
||||
|
@ -194,7 +194,7 @@ describe 'ceph::repo' do
|
|||
end
|
||||
|
||||
it { should contain_yumrepo("ext-epel-#{facts[:os]['release']['major']}").with(
|
||||
:enabled => '1',
|
||||
:ensure => 'present',
|
||||
:descr => "External EPEL #{facts[:os]['release']['major']}",
|
||||
:name => "ext-epel-#{facts[:os]['release']['major']}",
|
||||
:baseurl => 'absent',
|
||||
|
@ -209,7 +209,7 @@ describe 'ceph::repo' do
|
|||
)}
|
||||
|
||||
it { should contain_yumrepo('ext-ceph').with(
|
||||
:enabled => '1',
|
||||
:ensure => 'present',
|
||||
:descr => 'External Ceph nautilus',
|
||||
:name => 'ext-ceph-nautilus',
|
||||
:baseurl => "http://download.ceph.com/rpm-nautilus/el#{facts[:os]['release']['major']}/$basearch",
|
||||
|
@ -223,7 +223,7 @@ describe 'ceph::repo' do
|
|||
)}
|
||||
|
||||
it { should contain_yumrepo('ext-ceph-noarch').with(
|
||||
:enabled => '1',
|
||||
:ensure => 'present',
|
||||
:descr => 'External Ceph noarch',
|
||||
:name => 'ext-ceph-nautilus-noarch',
|
||||
:baseurl => "http://download.ceph.com/rpm-nautilus/el#{facts[:os]['release']['major']}/noarch",
|
||||
|
@ -246,7 +246,7 @@ describe 'ceph::repo' do
|
|||
end
|
||||
|
||||
it { should contain_yumrepo("ext-epel-#{facts[:os]['release']['major']}").with(
|
||||
:enabled => '0',
|
||||
:ensure => 'absent',
|
||||
:descr => "External EPEL #{facts[:os]['release']['major']}",
|
||||
:name => "ext-epel-#{facts[:os]['release']['major']}",
|
||||
:baseurl => 'absent',
|
||||
|
@ -258,7 +258,7 @@ describe 'ceph::repo' do
|
|||
)}
|
||||
|
||||
it { should contain_yumrepo('ext-ceph').with(
|
||||
:enabled => '0',
|
||||
:ensure => 'absent',
|
||||
:descr => 'External Ceph nautilus',
|
||||
:name => 'ext-ceph-nautilus',
|
||||
:baseurl => "http://download.ceph.com/rpm-nautilus/el#{facts[:os]['release']['major']}/$basearch",
|
||||
|
@ -269,7 +269,7 @@ describe 'ceph::repo' do
|
|||
)}
|
||||
|
||||
it { should contain_yumrepo('ext-ceph-noarch').with(
|
||||
:enabled => '0',
|
||||
:ensure => 'absent',
|
||||
:descr => 'External Ceph noarch',
|
||||
:name => 'ext-ceph-nautilus-noarch',
|
||||
:baseurl => "http://download.ceph.com/rpm-nautilus/el#{facts[:os]['release']['major']}/noarch",
|
||||
|
@ -280,7 +280,7 @@ describe 'ceph::repo' do
|
|||
)}
|
||||
|
||||
it { should contain_yumrepo('ext-ceph-fastcgi').with(
|
||||
:enabled => '0',
|
||||
:ensure => 'absent',
|
||||
:descr => 'FastCGI basearch packages for Ceph',
|
||||
:name => 'ext-ceph-fastcgi',
|
||||
:baseurl => "http://gitbuilder.ceph.com/mod_fastcgi-rpm-rhel#{facts[:os]['release']['major']}-x86_64-basic/ref/master",
|
||||
|
@ -299,7 +299,7 @@ describe 'ceph::repo' do
|
|||
end
|
||||
|
||||
it { should contain_yumrepo("ext-epel-#{facts[:os]['release']['major']}").with(
|
||||
:enabled => '1',
|
||||
:ensure => 'present',
|
||||
:descr => "External EPEL #{facts[:os]['release']['major']}",
|
||||
:name => "ext-epel-#{facts[:os]['release']['major']}",
|
||||
:baseurl => 'absent',
|
||||
|
@ -311,7 +311,7 @@ describe 'ceph::repo' do
|
|||
)}
|
||||
|
||||
it { should contain_yumrepo('ext-ceph').with(
|
||||
:enabled => '1',
|
||||
:ensure => 'present',
|
||||
:descr => 'External Ceph nautilus',
|
||||
:name => 'ext-ceph-nautilus',
|
||||
:baseurl => "http://download.ceph.com/rpm-nautilus/el#{facts[:os]['release']['major']}/$basearch",
|
||||
|
@ -322,7 +322,7 @@ describe 'ceph::repo' do
|
|||
)}
|
||||
|
||||
it { should contain_yumrepo('ext-ceph-noarch').with(
|
||||
:enabled => '1',
|
||||
:ensure => 'present',
|
||||
:descr => 'External Ceph noarch',
|
||||
:name => 'ext-ceph-nautilus-noarch',
|
||||
:baseurl => "http://download.ceph.com/rpm-nautilus/el#{facts[:os]['release']['major']}/noarch",
|
||||
|
@ -333,7 +333,7 @@ describe 'ceph::repo' do
|
|||
)}
|
||||
|
||||
it { should contain_yumrepo('ext-ceph-fastcgi').with(
|
||||
:enabled => '1',
|
||||
:ensure => 'present',
|
||||
:descr => 'FastCGI basearch packages for Ceph',
|
||||
:name => 'ext-ceph-fastcgi',
|
||||
:baseurl => "http://gitbuilder.ceph.com/mod_fastcgi-rpm-rhel#{facts[:os]['release']['major']}-x86_64-basic/ref/master",
|
||||
|
@ -348,7 +348,7 @@ describe 'ceph::repo' do
|
|||
shared_examples 'ceph::repo on CentOS' do
|
||||
context 'with default params' do
|
||||
it { should contain_yumrepo("ext-epel-#{facts[:os]['release']['major']}").with(
|
||||
:enabled => '1',
|
||||
:ensure => 'present',
|
||||
:descr => "External EPEL #{facts[:os]['release']['major']}",
|
||||
:name => "ext-epel-#{facts[:os]['release']['major']}",
|
||||
:baseurl => 'absent',
|
||||
|
@ -360,7 +360,7 @@ describe 'ceph::repo' do
|
|||
)}
|
||||
|
||||
it { should contain_yumrepo('ext-ceph').with(
|
||||
:enabled => '1',
|
||||
:ensure => 'present',
|
||||
:descr => 'External Ceph nautilus',
|
||||
:name => 'ext-ceph-nautilus',
|
||||
:baseurl => "http://download.ceph.com/rpm-nautilus/el#{facts[:os]['release']['major']}/$basearch",
|
||||
|
@ -371,7 +371,7 @@ describe 'ceph::repo' do
|
|||
)}
|
||||
|
||||
it { should contain_yumrepo('ext-ceph-noarch').with(
|
||||
:enabled => '1',
|
||||
:ensure => 'present',
|
||||
:descr => 'External Ceph noarch',
|
||||
:name => 'ext-ceph-nautilus-noarch',
|
||||
:baseurl => "http://download.ceph.com/rpm-nautilus/el#{facts[:os]['release']['major']}/noarch",
|
||||
|
@ -390,7 +390,7 @@ describe 'ceph::repo' do
|
|||
end
|
||||
|
||||
it { should contain_yumrepo("ext-epel-#{facts[:os]['release']['major']}").with(
|
||||
:enabled => '1',
|
||||
:ensure => 'present',
|
||||
:descr => "External EPEL #{facts[:os]['release']['major']}",
|
||||
:name => "ext-epel-#{facts[:os]['release']['major']}",
|
||||
:baseurl => 'absent',
|
||||
|
@ -402,7 +402,7 @@ describe 'ceph::repo' do
|
|||
)}
|
||||
|
||||
it { should contain_yumrepo('ext-ceph').with(
|
||||
:enabled => '1',
|
||||
:ensure => 'present',
|
||||
:descr => 'External Ceph firefly',
|
||||
:name => 'ext-ceph-firefly',
|
||||
:baseurl => "http://download.ceph.com/rpm-firefly/el#{facts[:os]['release']['major']}/$basearch",
|
||||
|
@ -413,7 +413,7 @@ describe 'ceph::repo' do
|
|||
)}
|
||||
|
||||
it { should contain_yumrepo('ext-ceph-noarch').with(
|
||||
:enabled => '1',
|
||||
:ensure => 'present',
|
||||
:descr => 'External Ceph noarch',
|
||||
:name => 'ext-ceph-firefly-noarch',
|
||||
:baseurl => "http://download.ceph.com/rpm-firefly/el#{facts[:os]['release']['major']}/noarch",
|
||||
|
@ -434,7 +434,6 @@ describe 'ceph::repo' do
|
|||
it { should_not contain_yumrepo("ext-epel-#{facts[:os]['release']['major']}") }
|
||||
it { should_not contain_yumrepo('ext-ceph') }
|
||||
it { should_not contain_yumrepo('ext-ceph-noarch') }
|
||||
it { should contain_yumrepo('ceph-luminous-sig').with_ensure('absent') }
|
||||
|
||||
it { should contain_yumrepo('ceph-storage-sig').with(
|
||||
:baseurl => "http://mirror.centos.org/centos/#{facts[:os]['release']['major']}/storage/x86_64/ceph-nautilus/",
|
||||
|
@ -452,7 +451,6 @@ describe 'ceph::repo' do
|
|||
it { should_not contain_yumrepo("ext-epel-#{facts[:os]['release']['major']}") }
|
||||
it { should_not contain_yumrepo('ext-ceph') }
|
||||
it { should_not contain_yumrepo('ext-ceph-noarch') }
|
||||
it { should contain_yumrepo('ceph-luminous-sig').with_ensure('absent') }
|
||||
|
||||
it { should contain_yumrepo('ceph-storage-sig').with(
|
||||
:baseurl => 'https://mymirror/luminous/',
|
||||
|
@ -468,7 +466,7 @@ describe 'ceph::repo' do
|
|||
end
|
||||
|
||||
it { should contain_yumrepo("ext-epel-#{facts[:os]['release']['major']}").with(
|
||||
:enabled => '0',
|
||||
:ensure => 'absent',
|
||||
:descr => "External EPEL #{facts[:os]['release']['major']}",
|
||||
:name => "ext-epel-#{facts[:os]['release']['major']}",
|
||||
:baseurl => 'absent',
|
||||
|
@ -480,7 +478,7 @@ describe 'ceph::repo' do
|
|||
)}
|
||||
|
||||
it { should contain_yumrepo('ext-ceph').with(
|
||||
:enabled => '0',
|
||||
:ensure => 'absent',
|
||||
:descr => 'External Ceph nautilus',
|
||||
:name => 'ext-ceph-nautilus',
|
||||
:baseurl => "http://download.ceph.com/rpm-nautilus/el#{facts[:os]['release']['major']}/$basearch",
|
||||
|
@ -491,7 +489,7 @@ describe 'ceph::repo' do
|
|||
)}
|
||||
|
||||
it { should contain_yumrepo('ext-ceph-noarch').with(
|
||||
:enabled => '0',
|
||||
:ensure => 'absent',
|
||||
:descr => 'External Ceph noarch',
|
||||
:name => 'ext-ceph-nautilus-noarch',
|
||||
:baseurl => "http://download.ceph.com/rpm-nautilus/el#{facts[:os]['release']['major']}/noarch",
|
||||
|
@ -502,7 +500,7 @@ describe 'ceph::repo' do
|
|||
)}
|
||||
|
||||
it { should contain_yumrepo('ext-ceph-fastcgi').with(
|
||||
:enabled => '0',
|
||||
:ensure => 'absent',
|
||||
:descr => 'FastCGI basearch packages for Ceph',
|
||||
:name => 'ext-ceph-fastcgi',
|
||||
:baseurl => "http://gitbuilder.ceph.com/mod_fastcgi-rpm-rhel#{facts[:os]['release']['major']}-x86_64-basic/ref/master",
|
||||
|
@ -521,7 +519,7 @@ describe 'ceph::repo' do
|
|||
end
|
||||
|
||||
it { should contain_yumrepo("ext-epel-#{facts[:os]['release']['major']}").with(
|
||||
:enabled => '1',
|
||||
:ensure => 'present',
|
||||
:descr => "External EPEL #{facts[:os]['release']['major']}",
|
||||
:name => "ext-epel-#{facts[:os]['release']['major']}",
|
||||
:baseurl => 'absent',
|
||||
|
@ -533,7 +531,7 @@ describe 'ceph::repo' do
|
|||
)}
|
||||
|
||||
it { should contain_yumrepo('ext-ceph').with(
|
||||
:enabled => '1',
|
||||
:ensure => 'present',
|
||||
:descr => 'External Ceph nautilus',
|
||||
:name => 'ext-ceph-nautilus',
|
||||
:baseurl => "http://download.ceph.com/rpm-nautilus/el#{facts[:os]['release']['major']}/$basearch",
|
||||
|
@ -544,7 +542,7 @@ describe 'ceph::repo' do
|
|||
)}
|
||||
|
||||
it { should contain_yumrepo('ext-ceph-noarch').with(
|
||||
:enabled => '1',
|
||||
:ensure => 'present',
|
||||
:descr => 'External Ceph noarch',
|
||||
:name => 'ext-ceph-nautilus-noarch',
|
||||
:baseurl => "http://download.ceph.com/rpm-nautilus/el#{facts[:os]['release']['major']}/noarch",
|
||||
|
@ -555,7 +553,7 @@ describe 'ceph::repo' do
|
|||
)}
|
||||
|
||||
it { should contain_yumrepo('ext-ceph-fastcgi').with(
|
||||
:enabled => '1',
|
||||
:ensure => 'present',
|
||||
:descr => 'FastCGI basearch packages for Ceph',
|
||||
:name => 'ext-ceph-fastcgi',
|
||||
:baseurl => "http://gitbuilder.ceph.com/mod_fastcgi-rpm-rhel#{facts[:os]['release']['major']}-x86_64-basic/ref/master",
|
||||
|
@ -580,8 +578,6 @@ describe 'ceph::repo' do
|
|||
}
|
||||
end
|
||||
|
||||
it { should contain_yumrepo('ceph-luminous-sig').with_ensure('absent') }
|
||||
|
||||
it { should contain_yumrepo('ceph-storage-sig').with(
|
||||
:baseurl => 'http://mirror.centos.org/centos/8-stream/storage/x86_64/ceph-nautilus/',
|
||||
)}
|
||||
|
|
Loading…
Reference in New Issue