|
115 | 115 | case facts[:osfamily]
|
116 | 116 | when 'RedHat'
|
117 | 117 | it { is_expected.to contain_package('yum-plugin-priorities') } if facts[:operatingsystemmajrelease].to_i < 8
|
118 |
| - it { is_expected.to contain_yumrepo('powertools') } if facts[:operatingsystemmajrelease].to_i >= 8 |
119 |
| - if facts[:operatingsystem] != 'Rocky' && facts[:operatingsystemmajrelease].to_i >= 8 |
120 |
| - it { |
121 |
| - is_expected.to contain_yumrepo('powertools').with('mirrorlist' => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=PowerTools&infra=$infra') |
122 |
| - } |
123 |
| - end |
124 |
| - if facts[:operatingsystem] == 'Rocky' && facts[:operatingsystemmajrelease].to_i >= 8 |
125 |
| - it { |
126 |
| - is_expected.to contain_yumrepo('powertools').with('mirrorlist' => 'https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=PowerTools-$releasever') |
127 |
| - } |
| 118 | + case facts[:operatingsystemmajrelease] |
| 119 | + when '8' |
| 120 | + it { is_expected.to contain_yumrepo('powertools') } |
| 121 | + if facts[:operatingsystem] != 'Rocky' |
| 122 | + it { |
| 123 | + is_expected.to contain_yumrepo('powertools').with( |
| 124 | + 'mirrorlist' => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=PowerTools&infra=$infra', |
| 125 | + ) |
| 126 | + } |
| 127 | + end |
| 128 | + if facts[:operatingsystem] == 'Rocky' |
| 129 | + it { |
| 130 | + is_expected.to contain_yumrepo('powertools').with( |
| 131 | + 'mirrorlist' => 'https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=PowerTools-$releasever', |
| 132 | + ) |
| 133 | + } |
| 134 | + end |
| 135 | + when '9' |
| 136 | + it { is_expected.to contain_yumrepo('CRB') } |
| 137 | + if facts[:operatingsystem] == 'Rocky' |
| 138 | + it { |
| 139 | + is_expected.to contain_yumrepo('crb').with( |
| 140 | + 'mirrorlist' => 'http://mirrorlist.rockylinux.org/mirrorlist?arch=$basearch&repo=CRB-$releasever', |
| 141 | + 'descr' => 'Rocky Linux $releasever - CRB', |
| 142 | + ) |
| 143 | + } |
| 144 | + else |
| 145 | + it { |
| 146 | + is_expected.to contain_yumrepo('crvb').with( |
| 147 | + 'mirrorlist' => 'http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=CRB&infra=$infra', |
| 148 | + 'descr' => 'CentOS Linux $releasever - CRB', |
| 149 | + ) |
| 150 | + } |
| 151 | + end |
128 | 152 | end
|
129 | 153 | it { is_expected.to contain_yumrepo('powerdns') }
|
130 | 154 | it { is_expected.to contain_yumrepo('powerdns').with('baseurl' => 'http://repo.powerdns.com/centos/$basearch/$releasever/auth-48') }
|
|
0 commit comments