Skip to content

Commit

Permalink
Merge pull request #1077 from wyardley/issues_988
Browse files Browse the repository at this point in the history
set manage_repo for Oracle "RedHat" (and not 5.x for any flavor anymore, for consistency with rest of module)
  • Loading branch information
juniorsysadmin authored Apr 13, 2017
2 parents b47c3d0 + b63f986 commit fb1f122
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
}
}
'RedHat': {
if ($::operatingsystem in ['RedHat', 'CentOS'] and $::operatingsystemmajrelease in ['5', '6', '7']) {
if ($::operatingsystem in ['RedHat', 'CentOS', 'Oracle'] and $::operatingsystemmajrelease in ['6', '7']) {
$_module_os_overrides = {
'manage_repo' => true,
'log_group' => 'nginx',
Expand Down
13 changes: 2 additions & 11 deletions spec/classes/nginx_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,19 +109,10 @@
it { is_expected.not_to contain_yumrepo('nginx-release') }
end

context 'operatingsystemmajrelease = 5' do
let(:facts) { { operatingsystem: operatingsystem, osfamily: 'RedHat', operatingsystemmajrelease: '5' } }
it { is_expected.to contain_package('nginx') }
it do
is_expected.to contain_yumrepo('nginx-release').with(
'baseurl' => "http://nginx.org/packages/#{operatingsystem == 'CentOS' ? 'centos' : 'rhel'}/5/$basearch/"
)
end
end

context 'RedHat / CentOS 5 with package_source => passenger' do
let(:facts) { { operatingsystem: operatingsystem, osfamily: 'RedHat', operatingsystemmajrelease: '5' } }
let(:params) { { package_source: 'passenger' } }

let(:params) { { package_source: 'passenger', manage_repo: true } }
it 'we fail' do
expect { catalogue }.to raise_error(Puppet::Error, %r{is unsupported with \$package_source})
end
Expand Down

0 comments on commit fb1f122

Please sign in to comment.