Skip to content

Commit

Permalink
only install SCL repo on CentOS
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Oct 3, 2023
1 parent 9450779 commit b0e6f51
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion manifests/repo.pp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
}
}

if ($facts['os']['release']['major'] == '7' and versioncmp($zabbix_version, '5.0') >= 0) {
if ($facts['os']['name'] == 'CentOS' and $facts['os']['release']['major'] == '7' and versioncmp($zabbix_version, '5.0') >= 0) {
package { 'zabbix-required-scl-repo':
ensure => 'latest',
name => 'centos-release-scl',
Expand Down
4 changes: 3 additions & 1 deletion spec/classes/repo_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@
it { is_expected.to contain_yumrepo('zabbix-nonsupported').with_baseurl('https://repo.zabbix.com/non-supported/rhel/7/$basearch/') }
it { is_expected.to contain_yumrepo('zabbix-nonsupported').with_gpgkey('https://repo.zabbix.com/RPM-GPG-KEY-ZABBIX-79EA5ED4') }

it { is_expected.to contain_package('zabbix-required-scl-repo').with_ensure('latest').with_name('centos-release-scl') }
if (facts[:os]['name'] == 'CentOS') {

Check failure on line 113 in spec/classes/repo_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Lint/Syntax: unexpected token tLCURLY (Using Ruby 2.6 parser; configure using `TargetRubyVersion` parameter, under `AllCops`)
it { is_expected.to contain_package('zabbix-required-scl-repo').with_ensure('latest').with_name('centos-release-scl') }
}

Check failure on line 115 in spec/classes/repo_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Lint/Syntax: unexpected token tRCURLY (Using Ruby 2.6 parser; configure using `TargetRubyVersion` parameter, under `AllCops`)
end
when '9'

Expand Down

0 comments on commit b0e6f51

Please sign in to comment.