CentOS: Purge advanced-virt repository
This is follow-up of 7c456d4b698817e185a11e8cee5cc30aa333cc89 and makes sure the advanced-virt repository is purged when disabled. Related-Bug: #1969484 Change-Id: I268675a4d17eb63861de5966e5b95434b792dd10
This commit is contained in:
parent
a3b1787090
commit
b59c8bb986
@ -205,6 +205,14 @@ class openstack_extras::repo::redhat::redhat (
|
|||||||
module_hotfixes => true,
|
module_hotfixes => true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
# NOTE(tkajinam): Ensure the advanced-virt repository is purged
|
||||||
|
file { '/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Virtualization':
|
||||||
|
ensure => absent
|
||||||
|
}
|
||||||
|
yumrepo { 'centos-advanced-virt':
|
||||||
|
ensure => absent
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if $manage_epel {
|
if $manage_epel {
|
||||||
|
@ -43,8 +43,12 @@ describe 'openstack_extras::repo::redhat::redhat' do
|
|||||||
it { should_not contain_file('/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud') }
|
it { should_not contain_file('/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud') }
|
||||||
it { should_not contain_yumrepo('rdo-release') }
|
it { should_not contain_yumrepo('rdo-release') }
|
||||||
|
|
||||||
it { should_not contain_file('/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Virtualization') }
|
it { should contain_file('/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Virtualization').with(
|
||||||
it { should_not contain_yumrepo('centos-advanced-virt') }
|
:ensure => 'absent'
|
||||||
|
) }
|
||||||
|
it { should contain_yumrepo('centos-advanced-virt').with(
|
||||||
|
:ensure => 'absent'
|
||||||
|
) }
|
||||||
|
|
||||||
it { should contain_file("/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-#{facts[:operatingsystemmajrelease]}").with(
|
it { should contain_file("/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-#{facts[:operatingsystemmajrelease]}").with(
|
||||||
:source => "puppet:///modules/openstack_extras/RPM-GPG-KEY-EPEL-#{facts[:operatingsystemmajrelease]}",
|
:source => "puppet:///modules/openstack_extras/RPM-GPG-KEY-EPEL-#{facts[:operatingsystemmajrelease]}",
|
||||||
@ -359,8 +363,12 @@ describe 'openstack_extras::repo::redhat::redhat' do
|
|||||||
shared_examples 'openstack_extras::repo::redhat::redhat in CentOS >= 9' do
|
shared_examples 'openstack_extras::repo::redhat::redhat in CentOS >= 9' do
|
||||||
context 'with default parameters' do
|
context 'with default parameters' do
|
||||||
it { should_not contain_yumrepo('rdo-qemu-ev') }
|
it { should_not contain_yumrepo('rdo-qemu-ev') }
|
||||||
it { should_not contain_file('/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Virtualization') }
|
it { should contain_file('/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Virtualization').with(
|
||||||
it { should_not contain_yumrepo('centos-advanced-virt') }
|
:ensure => 'absent'
|
||||||
|
) }
|
||||||
|
it { should contain_yumrepo('centos-advanced-virt').with(
|
||||||
|
:ensure => 'absent'
|
||||||
|
) }
|
||||||
|
|
||||||
it { should contain_yumrepo('rdo-release').with(
|
it { should contain_yumrepo('rdo-release').with(
|
||||||
:baseurl => "http://mirror.stream.centos.org/SIGs/$stream/cloud/$basearch/openstack-yoga/",
|
:baseurl => "http://mirror.stream.centos.org/SIGs/$stream/cloud/$basearch/openstack-yoga/",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user