diff --git a/manifests/dashboard.pp b/manifests/dashboard.pp index 9243a0e1..ab19c0f5 100644 --- a/manifests/dashboard.pp +++ b/manifests/dashboard.pp @@ -70,10 +70,6 @@ class cloud::dashboard( $debug = $os_params::debug ) { - if ! ($::osfamily in [ 'RedHat', 'Debian' ]) { - fail("module puppet-horizon doesn't support ${::osfamily}") - } - # We build the param needed for horizon class $keystone_url = "${keystone_proto}://${keystone_host}:${keystone_port}/v2.0" diff --git a/manifests/init.pp b/manifests/init.pp index 09860bb6..d0b785bc 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -20,6 +20,10 @@ class cloud { + if ! ($::osfamily in [ 'RedHat', 'Debian' ]) { + fail("module puppet-horizon doesn't support ${::osfamily}") + } + # motd file { diff --git a/spec/classes/cloud_dashboard_spec.rb b/spec/classes/cloud_dashboard_spec.rb index b542c240..83bcd005 100644 --- a/spec/classes/cloud_dashboard_spec.rb +++ b/spec/classes/cloud_dashboard_spec.rb @@ -71,16 +71,4 @@ describe 'cloud::dashboard' do it_configures 'openstack dashboard' end - context 'on other platforms' do - let :facts do - { :osfamily => 'Solaris', - :operatingsystemrelease => '10', - :concat_basedir => '/var/lib/puppet/concat' } - end - - it 'should fail' do - expect { subject }.to raise_error(/module puppet-horizon doesn't support/) - end - end - end diff --git a/spec/classes/cloud_init_spec.rb b/spec/classes/cloud_init_spec.rb index 5b3f359b..3e7a4d0e 100644 --- a/spec/classes/cloud_init_spec.rb +++ b/spec/classes/cloud_init_spec.rb @@ -78,4 +78,16 @@ describe 'cloud' do # it_configures 'private cloud node' end + context 'on other platforms' do + let :facts do + { :osfamily => 'Solaris' } + end + + it 'should fail' do + expect { subject }.to raise_error(/module puppet-horizon doesn't support/) + end + end + + + end