diff --git a/manifests/params.pp b/manifests/params.pp index c32d0ded..cdf5872d 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -1,25 +1,12 @@ # Katello Default Params class katello::params { - case $::osfamily { - 'RedHat': { - case $::operatingsystem { - 'Fedora': { - $rubygem_katello = 'rubygem-katello' - $rubygem_katello_ostree ='rubygem-katello_ostree' - } - default: { - $rubygem_katello = 'tfm-rubygem-katello' - $rubygem_katello_ostree ='tfm-rubygem-katello_ostree' - } - } - - $package_names = ['katello', $rubygem_katello] - } - default: { - fail("${::hostname}: This module does not support osfamily ${::osfamily}") - } + if $::operatingsystem == 'Fedora' { + $rubygem_katello = 'rubygem-katello' + } else { + $rubygem_katello = 'tfm-rubygem-katello' } + $package_names = ['katello', $rubygem_katello] $deployment_url = '/katello' diff --git a/spec/classes/katello_spec.rb b/spec/classes/katello_spec.rb index 51c219e6..e42b0e41 100644 --- a/spec/classes/katello_spec.rb +++ b/spec/classes/katello_spec.rb @@ -16,20 +16,4 @@ it { is_expected.to contain_package('katello').that_requires('Class[candlepin]') } end end - - context 'on unsupported osfamily' do - let :facts do - { - :concat_basedir => '/tmp', - :hostname => 'localhost', - :operatingsystem => 'UNSUPPORTED OPERATINGSYSTEM', - :operatingsystemmajrelease => '1', - :operatingsystemrelease => '1', - :osfamily => 'UNSUPPORTED OSFAMILY', - :root_home => '/root' - } - end - - it { expect { should contain_class('katello') }.to raise_error(Puppet::Error, /#{facts[:hostname]}: This module does not support osfamily #{facts[:osfamily]}/) } - end end